LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to use write to spreadsheet.vi

Hello Hafizzuddin,

 

                           I understand your problem. It is very simple to solve this. First of all you make MS EXEL file in your computer then save it with "your file name.csv" name. Note that there also include (" ") in saving process. Then in your vi at write to spreadsheet vi. on file path option create constant and browse your file path. Then at delimiter option enter ",". For separation your data to save in your csv file. This is a perfect soln. You will sure get the result.

 

 

Thank you,

Vinal G 

Vinal Gandhi, CLA
0 Kudos
Message 11 of 18
(1,533 Views)

hai Vinal G, it seems that using that method i only got a single respon line on the graph(blue line) which is not the respond i want, u can c from picture 1.

you can also see picture 2 if what i did is same as u mention.

or u can modified my rms 2 csv.vi i attach together. thank you 

Download All
0 Kudos
Message 12 of 18
(1,529 Views)
Try wiring a True constant to the Write to Spreadsheet VI for the Append? input.
0 Kudos
Message 13 of 18
(1,506 Views)
after wiring a true constant to it, my saved data become doubled than it should have. seems to be not working
0 Kudos
Message 14 of 18
(1,503 Views)
  • You should probably clear the data in the shift register after writing.
  • You use different delimiters for writing vs. reading spreadsheet file.
0 Kudos
Message 15 of 18
(1,495 Views)

i'm sorry but i cant understand both points

0 Kudos
Message 16 of 18
(1,476 Views)

altenbach wrote:
  • You should probably clear the data in the shift register after writing.

 

 You accumulate the 2D string array data in an uninitialized shift register. The contents of it grow without limits. On command, you append everything inside the shift register to the existing file (if append is true), this means you write all old history data instead of only the data since the last save operation.
 
You should also initialize the shift register to start empty. Currently, it will retain data from earlier runs.
 
The main problem is that your data in the shift register grows without limits, so the longer the program runs, the more data is to be saved. Ultimately, you'll run out of resources.
 

altenbach wrote: 
  • You use different delimiters for writing vs. reading spreadsheet file.

 

 
When writing the spreadsheet file, you are using a delimiter of three characters: ","
When reading from spreadsheet file, you are assuming the default tab delimiter.
 
------->   The delimiters must match!!!!
 
Overall, your program is very convoluted and different parts step on each others toes. For example whenever you are in read mode, the file never changes, yet you read the same file over and over again. Makes no sense. Once is enough. LabVIEW is good at parallel operations, so you could easily restore data from file wile continuing to acquire.
 
Here's a quick draft showing some alternatives. If you would set the file write operation to "append", you should also delete the wire going to the output tunnel in that case and make the tunnel to use default if unwired. This way the shift register clears when you write, but accumulated data when you don't.
 

 
Message Edited by altenbach on 01-31-2010 12:36 AM
Message 17 of 18
(1,468 Views)
hai altenbach, the VI is awesome but what i intend to do is that, i can pick which RMS i want instead of all RMS number apear in the table. plus i would like to restore not only the table, but also the graph. thank you
0 Kudos
Message 18 of 18
(1,455 Views)