04-15-2009 05:43 PM
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?
04-16-2009 10:33 AM
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.