02-23-2012 07:41 AM
I haven't really found a great answer yet. The closest I got was to find an open source document describing the binary structure of an excel file, but it is a large document and I really haven't taken the time to go through it.
Essentially, I'm looking for a simple solution to open an excel file directly for text only content like it is a text file without any external toolkits or applications.
02-23-2012 07:46 AM
There is no simple solution. You have the choices you've been given:
02-23-2012 07:47 AM
from what your saying I would say the best option would be batch convert all the xls files to csv then use read spreadsheet with a ',' as the delimiter. No need for excel and the speed is good
Hope it helps
TD
09-16-2012 03:20 PM - last edited on 06-04-2024 07:59 PM by Content Cleaner
@PhillipBrooks wrote:
If you have the NI Database Connectivity Toolkit, you can use that to open XLS files and read them in as a 2D array of strings.
The trick is the correct connection string. http://support.microsoft.com/kb/257819
See attached LabVIEW 8.6 VI.
Update to this post made back in 02-14-2012 10:22 AM by PhillipBrooks
As we have moved in to .xlsx files these days you should change the "Provider" and "Extended Properties" in the input "connection information".
The string should now say:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=%s;Extended Properties='Excel 12.0 Xml;HDR=No';
and if you do not have the provider installed, download it here:
http://www.microsoft.com/en-us/download/details.aspx?id=23734
HDR=No if you want all data and HDR=Yes if you have a Header you don't want to import.
I've attached the my updated version of this very useful file and hope you will not be offended by this Mr. PhillipBrooks.
Thank you!
02-21-2017 04:41 AM
Hi,
I had the same question, worth than that, I got an error when reusing the VI:
Report Generation Toolkit: Microsoft Word or Excel did not open.
My bp resolved with a very simple way, hope it is helpful for you.
Main idea: VI open a first excel file -> Closing it after opening the next.
This make the Excel keeping opened but only one file opened at a time.
It works well, no more pb of Microsoft open error, and run speed is good enough.
Good luck,
Richun
02-21-2017 10:08 AM - edited 02-21-2017 10:13 AM
@Steve_Block wrote:
I have a bunch of text only excel files that I want to read through to extract data, but the process of opening and closing excel is pretty cumbserome. Does anyone know of any vis that can extract excel spreadsheet data from the raw.xls file as opposed to having to open excel and communicate via the toolkit or activex?
If these files are indeed TEXT ONLY then you can just use the Read Delimited Spreadsheet.vi
How about posting a sample file?