LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with reading String from Xlsx file.

Solved!
Go to solution

Hi! I am trying to read string and numerical data from an xlsx file and trying to display its contents in a word file. I tried converting it to a .lvm file too. On using the "Read From Spreadsheet" tool, I get random characters as output. On using " Read From Measurement File" tool, I am getting an error saying "Error 100 occurred at Read From Measurement File->Untitled 1". What do I do? At the end I need to display the output, row by row, in a Microsoft Word file. I am so lost. Please Help.

0 Kudos
Message 1 of 7
(4,644 Views)

labview currently does not read directly from an xlsx file. If you convert the xlsx to an xls file first, then you can use the read from spreadsheet tool to load the data from the file.

Certified-LabVIEW-Architect_rgb.jpgCertified_TestStand_Architect_rgb.jpg


"I won't be wronged. I won't be insulted. I won't be laid a-hand on. I don't do these things to other people, and I require the same from them." John Bernard Books

0 Kudos
Message 2 of 7
(4,643 Views)
Solution
Accepted by topic author n_dogra

Read From Spreadsheet CANNOT read from an xls file. The Read From Spreadsheet can read from text files. Typically comma or tab separated. In order to read from an xls file, you need to use ActiveX such as the Report Generation Toolkit uses.

0 Kudos
Message 3 of 7
(4,638 Views)

 

@bsvare wrote:

labview currently does not read directly from an xlsx file. If you convert the xlsx to an xls file first, then you can use the read from spreadsheet tool to load the data from the file.


Hey, I tried doing that. It still just gave the values 0.00 in all the cells of the indicator array. Plus my file has string in it also. The data type in the spreadsheet was "general". Here in the tool, it is "Double". I changed the tool data type to string and spreadsheet to text but I only got gibbrish for my efforts.

 

Thanks anyway! 🙂

0 Kudos
Message 4 of 7
(4,634 Views)

@Dennis_Knutson wrote:

Read From Spreadsheet CANNOT read from an xls file. The Read From Spreadsheet can read from text files. Typically comma or tab separated. In order to read from an xls file, you need to use ActiveX such as the Report Generation Toolkit uses.


I changed the xls file to a txt file and it worked! I can now see the output! Thank you so much!

0 Kudos
Message 5 of 7
(4,630 Views)

Then please mark my answer as the solution instead of your thank you. You can click on 'Options' to change it.

0 Kudos
Message 6 of 7
(4,622 Views)

Thanks Denis. I have the report generation toolkit. Could you please let me know what block should I use?

Thanks

0 Kudos
Message 7 of 7
(4,521 Views)