08-03-2020 05:30 AM
Hello community,
I got a strange error with the NI Report Toolkit.
First, I open the excel file via:
Open the excel file
And then read out the Data that is located at the defined row:
Read Data
If I enter a number that is equal or bigger than 330 via ‘Seriennummer Akku’, that means 332 at the ‘Excel Get Data.vi’, the vi answers with Error -41117 and I got no data out.
The error message
The problem is that my excel sheet has more than 332 rows and I realy need them ^^
The vi works from 0 to 332. I can´t understand why it fails at this value.
Does someone have an solution?
Thank you very much
The-Dude
Solved! Go to Solution.
08-03-2020 06:22 AM
Dear Dude,
You almost certainly "did something wrong" or "have a corrupted Excel file". As you attached neither the "file that fails to read" nor the LabVIEW code (meaning something we can examine, can edit, can correct, can test, can run), that's about as much help as we can give.
The RGT has been around for more than a decade, and has been used successfully by lots of us. To get the quickest, most robust response to your problem, I recommend you do the following:
This will allow us to duplicate your situation, and see the error (or not!) for ourselves. Once we see the problem, we can recommend how to fix it.
Bob Schor
08-03-2020 06:51 AM
Hey Bob,
first of all, thank you very much for your fast response. You are totally right.
Attached you find an 7z container with the necessary vi and the excel file.
If you start the vi (there is just one), klick "Datei laden" and wait while the excel file is opened.
After that is finished, you can enter a number in the field "Seriennummer Akku" and press enter. Then the vi will display the values that are stored at the excel file. If you type 330 or above, the error will appear.
With that files and the information, you should be able to duplicate the situation. I´m curious to hear from you.
The-Dude
08-03-2020 07:23 AM - edited 08-03-2020 07:27 AM
The reason to say "Compress the file" is that Windows make a .zip, which any Windows 10 system can open. Yet you chose to use a proprietary compression, which many Forum uses won't be able to (or simply "won't") open. Oh, well ...
Bob Schor
P.S. -- I own WinZip, which should be able to open a .7z file, but could not open yours. I'll repeat my request:
08-03-2020 07:42 AM
Hey Bob,
sorry for the mess. I didn´t know that there are so many differences between 7z and zip.
Attached is the zipped folder. There is everything you need inside. More that the steppes I wrote in my previous post are not necessary to get the error.
Thank you
The-Dude
08-03-2020 09:48 AM
You are using Excel Get Data.vi with the data type 2D Array of U16 but this is not the actual data type of all the cells in the range you are querying.
Error -41117 details are:
Possible reason(s):
Report Generation Toolkit: One or more cells contain invalid data or data that is incompatible with the specified data type. Remove all invalid data, or specify a different data type.
If you look at your Excel file and displays the formulas you will see that starting on row 330 you have formulas ans conditional formatting. Also the results displayed in column K are not U16 but letters. You also have text in cell G330.
That is what's causing the issue.
Ben64
08-03-2020 09:57 AM
08-04-2020 04:09 AM - edited 08-04-2020 04:12 AM
Hey Ben64,
ahhh that was to easy but i was not able to see it. Thanks a lot!
It’s clearly to understand after you explained the problems in my excel sheet.
I had my main focus on the VI to find the failure, not on the excel sheet.
Now I reworked my vi and changed the one ExcelGetData query into two ExcelFetData queries as you propose. This is the easiest way I think!
Thanks man!
The-Dude