LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

creat file to write to spread sheet

Hi all,

I'm trying to save my voltage and time data after DAQ. The data went out OK. They are built to be a 2D array and I transposed them.  I wish to write them in Excel and thus can process data in that.

I used  "File Path Control", "Open/Creat/Replace File', and connected the refnum to "Write to Spread Sheet File". Now I have two questions about writing to spreadsheet file.

First, I'm using Labview 8.0, and there is no dialog pops out even if the "File Path" is empty. If I enter file path firstly, I have to specify .xls in order to create a Excel file. How to make the dialog telling me I haven't select a file path pop up in case I forgot and all the data would be lost?

Second, Is there a way to append string head to a spread sheet? For example, time   (tab)  voltage?

Thanks a lot!
Message 1 of 3
(3,154 Views)

hi learner2,

if you want to wrtie to an excel file directly, you can try to use a wrtie to spreadsheet vi on the functions palette in file I/O . you can connect your 2D array to the input, specify the format and it will automatically ask you the location where to save your spreadsheet. Try using find examples and type "excel" in the search field to find more examples regarding spreadsheet .

 

0 Kudos
Message 2 of 3
(3,140 Views)
Hi Learner2,
Please refer to this KB and you can format your string array so that the first column contains the time stamp and second contains the voltage values.

Yi Y.
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 3 of 3
(3,111 Views)