LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

adding header to spreadsheet

Hi

 

I have managed to add headers to the spreadsheet following WIlls example and works well.  https://decibel.ni.com/content/docs/DOC-3817

 

 However, I found out that it replaces the data in the existing file everytime when I run the vi. I want to keep the previous data under the same file name. I overcame this by putting append to file to"true" of the header write to spreadsheet but it writes the header again.

Is there a way of avoiding this? Please help.

 

Regards,

 

Ashvin

0 Kudos
Message 1 of 3
(3,630 Views)

You can check to see if the selected file exists before doing to write. You could assume that if the file exists, the headers are there. Or, to be a bit more robust, open the file and read it. If row 0 has the header information, skip rewriting it. Of course, if the front panel control is blank, you will be prompted to select a file and then you would need to modify the Write to Spreadsheet File function. It would probably be simpler to skip the Write to Spreadsheet File for the header information and simply use the Write to Text File.

 

p.s. Users would probably like to see the Browse button visible on the path control.

0 Kudos
Message 2 of 3
(3,628 Views)

Thanks Dennis for your promp reply. I'm not that proficient in labview but I'll give it a go and hopefully i'll overcome this issue.

0 Kudos
Message 3 of 3
(3,623 Views)