LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

which part in the "write to spreadsheet file.vi" gives....??

Hi....
I would like to know which part inside the vi gives me this option to wire connect these tasks (lABvIEW 6):

1. Extract data from 2D array, index it and write the indexed data to specific cells location.

2. Look for an Excel template file (formatted with formulas) so that the data in task 1 can be saved.

I have attached an image for your understanding if you decide to answer my problem.

Thanks..
juni
0 Kudos
Message 1 of 6
(3,137 Views)
The quick answer is that no part inside the VI gives these options. Write to Spreadsheet.vi is for writing comma/tab separated text files. It is not Write to Excel.vi. To get the options you want, there is the add-on Report Generation toolkit or your can write your own ActiveX functions using the shipping example Write Table to XL.vi as an starting point or any of the other examples on NI's Developer Zone.
0 Kudos
Message 2 of 6
(3,137 Views)
Hi Dennis,
I have worked out using Active X and some examples provided by LabView6 to get data and save into Excel format.

I have yet to be able to extract the data from my global array and store those data into a specific location in the Excel formatted with formula cells.

I have attached here my working example. Could you help me more here, please.

jun
0 Kudos
Message 3 of 6
(3,137 Views)
Hi Dennis..

I don't expect you to do all the bits and pieces for me but if you could show me with a simpler code (small program) that take data from the 2D array and write the data to an Excel (already formated template) at specific location cell the way i would like it to be. (earliest question.)

Grateful,
juni
0 Kudos
Message 4 of 6
(3,137 Views)
In your Main.vi, you have the Set Cell Value.vi inside of a couple nested for loops. You've gotten this from the shipping example and it starts writing at row 2, column one which gets translated to cell A2. You can use Set Cell Value inside of a loop and initialize the starting row/column to anything you want and then write to one cell at a time. The alternative is to just use the worksheet.range method, specifying cell 1 and cell 2, and write a whole range of data at once using range.value property. I haven't had to do this in quite a while and don't have an example handy but the Excel VBA help should have the information you need. There are also a lot of other Excel examples here that you might want to look at.
0 Kudos
Message 5 of 6
(3,137 Views)
Hi Dennis..
I have gone through some of the examples at the NI EXCEL Developement site. I have managed to work out the data manipulation in the EXCEL...thanks for your tips too. There are 2 things I would like you to help me again, if you are willing please look at my attachement.

Could you look at my code please to see is there anyway to write a cleaner code?

And also could please help me with a save dialog.vi which I would like to pop up to let the user keying a filename before saving the file. The thing is I am don't where to put this vi.

Many thanks,
juni
0 Kudos
Message 6 of 6
(3,137 Views)