04-10-2018 04:22 AM - edited 04-10-2018 04:23 AM
Hi samehA,
but the Vis that I found give only the number of sheets and rows in an .xlsx file.
I'm pretty sure there are also XLR8 functions to read the content of the sheets. And I'm sure this is shown in the XLR8 example VIs, too…
( I own a XLR8 license, but haven't installed it on my work computer, so I cannot check the needed VIs right now.)
to read an xlsx file format, and load seperately each worksheet in a 2D array ?
As said before (several times): you can parse the sheet.xml data on your own after you UNZIP the XLSX file…
04-10-2018 05:28 AM
This snippet can you get started. Of course, you still need to program the xml parsing part, I never did it, but I guess it is not that difficult...
04-10-2018 05:45 AM
And of course there's the specification:
https://msdn.microsoft.com/en-us/library/gg548604(v=office.12).aspx
Probably a lot of work even just to read it, but it's all there!
04-10-2018 05:58 AM
Actually what is in these Excel files what your program needs to read?
Is that some configuration type of data? If so, i would just use config .ini files via the OpenG Config tool. These ini files are also human readable, and very easy to read/write from LabVIEW...
04-10-2018 07:24 AM
In fact, the initial .xlsx file is a multi- sheets file ( there are at least 4 worksheets in one file, it depends on the file i select to treat data from), and they are in similar format ( text and number- 2D array in each worksheet), So i need to read data existing in the 2D array of each worksheet, there isn't any configuration type of data.
04-10-2018 07:31 AM
@Student_LV wrote:
In fact, the initial .xlsx file is a multi- sheets file ( there are at least 4 worksheets in one file, it depends on the file i select to treat data from), and they are in similar format ( text and number- 2D array in each worksheet), So i need to read data existing in the 2D array of each worksheet, there isn't any configuration type of data.
Ok, but are you really forced to use Excel files? Is this a rigid requirement? The users of your LabVIEW application could easily create and handle csv files. Everything would be just much simpler...
04-10-2018 07:58 AM
it was a requirement to read data from .xlsx file but Even when i tried to do it with CSV files, i couldn't put several sheets into one CSV file, i was blocked on how to implement the "sheet" delimiter. i might write VBA code, as was said to me, to have Excel, save all the sheets into one CSV file and develop LabVIEW code to read that CSV file and parse the sheets…
04-10-2018 08:11 AM
Write a LabVIEW program that will run on the PC that has Excel and creates the CSV file that has the multi-sheet data. Transfer that data file rather than the XLSX file to the PC that doesn't have Excel.