LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Formating Data for Read from Spreadsheet

Hello,

I am trying to read data with the function Read from Spreadsheet. Can I do this with a file in Excel? I saved it as a .csv file, both tab and comma delimited and neither work. Does this function truely read from a spreadsheet, or does it need to be a text file? What is the correct format for this data?

Thank you!
Download All
0 Kudos
Message 1 of 3
(2,415 Views)
You need to set the "delimiter" input of the Read from Spreadsheet vi. Wire a string constant with a comma in it and you should be fine. A .csv file is really just a text file anyway.

The other problem that I saw was that you set the "transpose" input to true, this caused the data to be stored in the array across two rows, when your code was looking for it to be down the two columns. Change that boolean to false and you should be all set, it works on this end at least.

I hope this helps. Let us know if it doesn't!

Brian
0 Kudos
Message 2 of 3
(2,415 Views)
I had no problem reading the .csv file once I specified a comma as a separator in your VI. The function reads text files with values separated by commas, tabs, or just about any other character. If you want to read Excel directly, you can use ActiveX to do so.
0 Kudos
Message 3 of 3
(2,414 Views)