LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

how to save/read a table to/from disk

hi

i have a table that the user enters data into and I would like to be able to save this data in a comma delimited text format on disk and then read it back and restore the table

can this be done (i'm sure) and most importantly how would I go about doing it

Thanks in advance.
0 Kudos
Message 1 of 4
(3,394 Views)
Yes, what you would do is read the values from the table with GetTableCellRangeVals. This will give you an array of values. Then use the function ArrarToFile to output a comma-delimited file from the array.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 2 of 4
(3,394 Views)
hi Chris

thanks for the response.

I found another way as well

i wired the table to a Frac/Exp String to number VI and then wired that to a Write to spreadsheet file VI and it generates, an admittedly, tab delimited file, however simply reversing the procedure permits me to re-populate the table from the spreadsheet file.

i will look at your suggestion however.

thanks again for the help
0 Kudos
Message 3 of 4
(3,394 Views)
Sorry, you are obviously using LabVIEW, my instruction was for LabWindows/CVI. I assumed you were using CVI since you posted your question to the LabWindows/CVI forum.

Chris
0 Kudos
Message 4 of 4
(3,394 Views)