LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

XLSREAD problem

I am trying use xlsread in mathscript.  I do not run into a problem when the excel spreadsheet has only numeric values but when the spread sheet has both string and numeric values I get the a 90001 error.  Is there a way to read an excel file that both string a numeric values. Attach is my code and excel spread sheet?

 

 

 

Download All
0 Kudos
Message 1 of 2
(2,887 Views)

The LabVIEW Help for xlsread indicates this:

If you use a range operator to specify the range or if you do not specify a range, all call data in the range must be scalar. Otherwise, this function returns NaN.

Based on a quick look at your MathScript code it seems to me that it would be far easier if your data was saved as a simple text file with tab-delimited columns which you can read directly using the Read Spreadsheet File VI. The rest of the code seems to be some sort of sorting, which can do using LabVIEW functions. If you want to sort the items as a 2D array then use the OpenG Array functions. 

Message 2 of 2
(2,857 Views)