From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get data from an existing Excel file using report generation toolkit

Solved!
Go to solution

I'm trying to use the Excel Get Data vi from the report generation toolkit, but i can't figure out how to turn a browsable path into the right type for the VI.  I've tried using the New Report.vi, but that doesn't work unless you use a template.  It won't open an existing excel file and make it an open report to pull data from.

Essentially, i have a bunch of excel files that have data in them and i want to use a VI to analyze the data.  So, i'm trying to pull in all the data directly from the excel file so i don't have to reproscess them all into text so i can use the more standard spreadsheet VIs.  But to even convert the excel file programtically in labview won't i still need to be able to open the excel file and get the data?

0 Kudos
Message 1 of 7
(3,537 Views)

have you tried Read Spreadsheet file?

If you dont mind possting, can you post the excel file you want to read?

 

Best regards,
Krispiekream
0 Kudos
Message 2 of 7
(3,530 Views)

Krispiekream,

 

You've been on the forums long enough to know that Read from Spreadsheet File has nothing to do with reading Excel files.

0 Kudos
Message 3 of 7
(3,525 Views)

Really?

I use it to read my excel files.

I must have mistaken.

 

 

Best regards,
Krispiekream
0 Kudos
Message 4 of 7
(3,523 Views)

It reads text files.

 

Open up your file in notepad.  If it is readable to you (and doesn't have XML code), it is a text file and can be read with Read Spreadsheet file.  DO NOT give these kinds of files .xls extensions because they are not Excel files.  If it is not readable to you because it is mostly crazy characters, then you do have a real .xls file.  Read from Spreadsheet file cannot read that file.

0 Kudos
Message 5 of 7
(3,520 Views)

I C.

Got it,

the reason why I can view it using my Excel file because its in .CSV.

I open Microsoft Excel to open .CSV file.

But you can also open .csv file with notepad.

So, you cannot open .xls with Read Spreadsheet File

I learn something everyday Smiley Indifferent

 

Best regards,
Krispiekream
0 Kudos
Message 6 of 7
(3,516 Views)
Solution
Accepted by topic author mbaycura

I figured out my problem.  It turns out not to have been a problem with the New Report toolkit vi.  i had accidentally wired a folder path input control instead of a file path input control to it.  Changing the type to file took care of it and i was able to access the excel files i wanted using the New Report VI to pull the file and Excel Get Data to pull the data.

0 Kudos
Message 7 of 7
(3,509 Views)