11-24-2009 04:45 AM
Hi
i have made this VI (Attached).
I want to know why it is displaying a wrong data from the .xls file?
11-24-2009 05:25 AM
Hi,
Please try using activex functions for Excel read.I have attached a sample program to read only a cell,like that you can create a program to read the entire file.Actually labview can read an excel file which it has created.So i think thats the problem.
Thanks and regards,
srikrishnaNF
11-24-2009 05:29 AM
Hi,
The function Read from Spreadsheet Files, doesn't really read a file that is made by Microsoft Excel.
This function reads a text file which has tabs and new lines as delimitters. Please see the attachment for an example
Hope it helps.
11-24-2009 09:18 AM
srikrishnaNF wrote:
Actually labview can read an excel file which it has created.So i think thats the problem.
???
After reading this about 3 times I still don't understand what it means. Can you please elaborate on what you mean by this?
11-24-2009 09:30 AM
???
After reading this about 3 times I still don't understand what it means. Can you please elaborate on what you mean by this?
The excel file that is attached wasn't created by LabVIEW. It was created in Excel, it has some border formatting and all too!. So I guess he is trying to imply that.
11-24-2009 10:50 AM
11-24-2009 02:36 PM
11-24-2009 11:07 PM
hello smercurio_gc,
what i mean is that suppose you are saving data to the spread sheet file using "write to spreadsheet file" or "write to measurement file" ,then that spread sheet file can be read using "read from spread sheet file" or "read from measurement file".If the spread sheet file is created in some other way,you have to use activex functions.This is what i observed.
Thanks and regards,
srikrishna.J
11-25-2009 12:48 AM
11-25-2009 02:07 AM
Hi
If the xls file has been created by manually entering the values in the sheet, the you cannot read it by using the the read from the spreadsheet function as it wont be able to interpret the xls file properly and will return all zeros as in this case (attached by user).
If you want to get the excel sheet data into an array in LabVIEW you will have to save the Excel file as a tab delimited text file and you can do this in Excel, by selecting File»Save As. Then select Text as the Save As Type. Now give the path of the new txt file. You will be able to read Your file.