LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading from file one at a time

I am trying to read from an Excel file one cell at a time, and am having some trouble. I have included my VI. Any help would be greatly appreciated.
0 Kudos
Message 1 of 2
(2,076 Views)

Your first problem is that you are using the Read file function. This doesn't work with Excel. Native Excel files have their own special format and you have to use ActiveX to read them. If you have the report generation toolkit, you can use that or look at the examples on the Excel Board. You can also save the Excel file as comma or tab separated text and then the Read From Spreadsheet or Read File will work.

Second, if the file is static, you would be much better off to read the file all at once to an array and then just index out the values inside the while loop. It looks like you are getting temperature values from a file. Is the Excel file being generated at the same time as your program? If it is, what is generating the file? Maybe that program can be controlled by LabVIEW and you can get the temp values directly from it. If it's a file that is constantly being updated, then the reading is going to be somewhat comlpicated if you care at all about getting the most recent value.

Message 2 of 2
(2,052 Views)