LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing Excel files from LabVIEW without the Excel API

The reason why i asked the questions that I did is because we get a lot of question on here like "Help me read from Excel" when really the file that they were trying to read was just a tab delimited text file.

 

Still though, it seems that it would be easier to save the Excel speadsheets to a tab delimited text file and the write a really small vi to read the file and manipulate it and then save it again.

 

Just my 2 cents




Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 11 of 20
(3,412 Views)

We've tried the ADO interface to Excel and were able to pull out data, althrough there are a few data format issues we need to work out.


smercurio_fc wrote:

Wiebe@CARYA wrote:
For both ADO and DDE, you'd probably still need Access to be installed (for DDE it needs to be running)!

I'm not 100% sure, but I believe there's a runtime engine for Access. Don't know if it will be sufficient for ADO and/or DDE, though.


 

I'm not 100% sure yet, but you don't need the runtime engine for Access use ADO.  I've verified this with our MS Access DB, not sure about using it to get to Excel though.   I'll have to give that a try next.

0 Kudos
Message 12 of 20
(3,398 Views)

To be clear: To access ADO the only thing that needs to be installed on your PC is some version of Windows.

 

Also for what it's worth, Access is only an application development environment that by default connects to a database engine (called Jet) that is built into Windows.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 13 of 20
(3,372 Views)
Access databases are easy to us without Access, the ODBC drivers for access
are installed on windows by default. That's all you need.

So, I checked, and Excel also has ODBC drivers. I don't know if they are
installed by default (since I have it installed, I can't check), but I bet
they are! So, you could probably use LabSQL to get data from excel sheets!

Regards,

Wiebe.


0 Kudos
Message 14 of 20
(3,363 Views)

Here's a link I found today. Apparently, ADO is becoming the prefered method for reading Excel spreadsheets...

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 15 of 20
(3,336 Views)
Hmmmm... That was written back in 2005. Wonder if it still applies for Office 2007, since the file formats are different.
0 Kudos
Message 16 of 20
(3,322 Views)

mikeporter wrote:

Here's a link I found today. Apparently, ADO is becoming the prefered method for reading Excel spreadsheets...

 

Mike...


 

Glad to see you're still out there Mike, although I missed the old signature line from your info-labview days.  Nice tie in though with the profile pic though.

 

Since Tuesday we've been playing around with data extractions using ADO and have had some success.  We can get the data easily enough, but are having issues with the format (text vs. numeric etc.).  They mention this in the link at the bottom (PRB: Excel Values Returned as NULL Using DAO OpenRecordset) and it looks like we need to do some massaging of the source file.   We use ADO extensively to pull data from Access DBs and it's never been a problem since it always comes out in string arrays.  Eventually this file will get replaced with a DB, but for now we're stuck trying to extract it this way.

 

Alternatively we're also still investigating the OpenOffice API, but I don't think that will work.

 

Thanks again to everyone for your help

 

0 Kudos
Message 17 of 20
(3,315 Views)

Here is very simple VI to read data from Excel using ADO.

0 Kudos
Message 18 of 20
(2,065 Views)

I have use the third party XLR8 toolkit 

 

XLR8 can open, create, and modify actual Excel files (.XLSX) directly without the needing Excel installed on the target or development machine. (and without using ActiveX methods)

 

This has saved my company a lot of money by not needing M$ Office installed on every computer in the lab.

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 19 of 20
(2,045 Views)
Any examples using ADO tool to read from excel file?
0 Kudos
Message 20 of 20
(1,644 Views)