LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I read data from multiple sheets in an excel xls file?

I am quite familiar with the read from spreadsheet file VI and am using it in my current version of the program. However I currently have a test stand that spits out a single sheet per specimine analized on excel inside of the file. I was manually copying and pasting all the data that I needed onto a single sheet, then saving as a tab deliminated text file, however the more and more samples I am running the more cumbersome this is getting. Presently I have about 30 sheets, to go through, soon I may have 100 or so. 

 

I was wondering if anyone has some insight or can link me to any articles that would show me how to actually read an XLS file directly? Ideally I would like to do the following;

 

Step #1: Take in the names of all the sheets in the file and convert to a string array. (help needed here)

Step #2: Search the array of names for the sheets to analyze. (no problem)

Step #3: When the sheet is one I want to search I would like to import the 2D string array to LabVIEW (help needed here)

Step #4: Do current analysis that I am doing with the manually reduced file. (no problem)

 

Thanks,

 

Adam

Message 1 of 4
(2,767 Views)

Hi adam,

 

did you search the forum? You will find a lot of threads handling the problem of Excel file access.

 

In short: you need to use ActiveX (the RGT also uses ActiveX under the hood)!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(2,762 Views)

Hi Gerd,

 

Thanks for the quick reply, yes I did a quick search with the following keywords "Read data from multiple sheets in an excel xls file" and didn't find anything. I will try using the keywords ActiveX and excel for my searches now, any ideas on better things to search by? 

 

Have you seen this one discussed in the past?

 

Thanks,

 

Adam 

0 Kudos
Message 3 of 4
(2,757 Views)

Hi Adam,

 

searching for "Excel ActiveX" brings up enough threads to read…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(2,753 Views)