LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

reading from excel

I have an excel sheet which has been manually entered. I want to read this data in a array in LabVIEW. But when I try to read this using either the "read characters from file.vi" or the open- read- close method, I get junk characters in the table.
I have tried to search the site for an answer but none of the methods seem to hold true if I have a manually entered excel sheet. Also as far as possible I dont want to use ActiveX.
0 Kudos
Message 1 of 9
(3,135 Views)
Hello,

LabVIEW havn't built-in vi's for read\write Excel files. The "read characters from file.vi" read bytes stream, and it don't know format of excel file.
You must use ActiveX.
Attached vi read cells from excel file. Set left upon corner and rignt bottom corner as parametrs.
Good luck.

Nadav Chernin
nchernin@chiaro.com
0 Kudos
Message 2 of 9
(3,135 Views)
Hi

A workaround could be to save your excel file as Text(tab limited). FILE>SAVE AS and than select under save as type Text (tab limited) instead of Microsoft Excel Workbook. You can import this file than with the "read from spreadsheet file.vi".
Regards,
Luca
0 Kudos
Message 3 of 9
(3,135 Views)
Isnt there anyother way. because I have a number of excel sheets (reports). so it is not easy to change the format of each... so isnt there anyway I can read it from LabVIEW.
0 Kudos
Message 4 of 9
(3,135 Views)
There isn't really another way. I think you can't go around activex programming. But there are a lot of examples which you can take. Like the one from Nadav. Or you buy the "report generation toolkit" from NI.
Regards,
Luca
0 Kudos
Message 5 of 9
(3,135 Views)
You can use DDE, that way you can choose which row, column and sheet you
want to access.
Requires Excel to be up and running though.

Yours/
Roger Ohlund, MSc Engineering Physics

"sdoctor" wrote in message
news:506500000005000000D1770000-1019262487000@exchange.ni.com...
> Isnt there anyother way. because I have a number of excel sheets
> (reports). so it is not easy to change the format of each... so isnt
> there anyway I can read it from LabVIEW.
0 Kudos
Message 6 of 9
(3,135 Views)
I think that ActiveX more good because it don't require Excel running.
0 Kudos
Message 7 of 9
(3,135 Views)
I agree, the ActiveX is the best method. Thank you Nadav. Also I solved the problem I was having
0 Kudos
Message 8 of 9
(3,135 Views)
I agree, the ActiveX is the best method. Thank you Nadav. Also I solved the problem I was having
0 Kudos
Message 9 of 9
(3,135 Views)