LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem in reading the file

Hi

 

i have made this VI (Attached).

 

I want to know why it is displaying a wrong data from the .xls file? 

Download All
0 Kudos
Message 1 of 11
(3,404 Views)

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

Regards,
Srikrishna


0 Kudos
Message 2 of 11
(3,391 Views)

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.

0 Kudos
Message 3 of 11
(3,388 Views)

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? 

0 Kudos
Message 4 of 11
(3,369 Views)


???

 

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.

 

 

0 Kudos
Message 5 of 11
(3,364 Views)
Except that LabVIEW doesn't create Excel files unless you use ActiveX. That file can be read just fine in LabVIEW if you use ActiveX - borders are irrelevant. We need to be clear on the terminology. "Spreadsheet" file does not equal Excel file.
Message 6 of 11
(3,351 Views)
there are also examples of the activex in the example files that ship with labview
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 7 of 11
(3,333 Views)

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

Regards,
Srikrishna


0 Kudos
Message 8 of 11
(3,313 Views)
For all who would like to communicate with excel Here is the link which has almost all the soultions possible.
0 Kudos
Message 9 of 11
(3,302 Views)

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.

Somil Gautam
Think Weird
0 Kudos
Message 10 of 11
(3,293 Views)