LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

csv

Hi :
attach see file , as you see its will create csv file at c:\temp\date
 
its work well , but i need to add title to each column , only when i create file in the first time
 
how can i do that
 
thanks
0 Kudos
Message 1 of 7
(3,435 Views)
Hi elyan,
you can create a csv file with the "Write to Spreadsheet File" function. At the first time add a header row in your array and in all other, in which you use the append "true", write only the values to it.

Hope it helps.
Mike
0 Kudos
Message 2 of 7
(3,432 Views)

can you help me with this issue

 

thank yo very much

 

0 Kudos
Message 3 of 7
(3,399 Views)
Hi elyan,
here is an example for you. It´s a LV71 example so, please change my "Write to Spreadsheet File" function with yours, shipped with 8.x.

Hope it helps.
Mike
0 Kudos
Message 4 of 7
(3,390 Views)
All you need to do is check if the file exists, and if not, create it and write the header. Here's a quick rewrite of your program. Use an event structure so the loop only spins if needed. If you don't want to write one last record if the stop is pressed, make a seperate event for the stop button.
 
 
points that were incorrect or inefficient in your progam:
  • You don't have a wait in your loop, so if no button is pressed, the loop will consume all available CPU doing basically nothing.
  • 90% of the code in your two cases is the same. Duplicate code belongs outside the case structure.


Message Edited by altenbach on 06-28-2008 12:45 PM
Download All
Message 5 of 7
(3,384 Views)

Hi Mike,

Can you please attach the missing subvi Write to Spreadsheet File_str_private.vi ?

- Partha ( CLD until Oct 2027 🙂 )
0 Kudos
Message 6 of 7
(3,299 Views)

Hi Partha,

it´s only the string part of the "Write to Spreadsheet file.vi", because in LV7.1 the vi has only the dbl instance. Smiley Happy

Mike

0 Kudos
Message 7 of 7
(3,293 Views)