03-23-2015 04:16 AM
Hi,
one more difference to plain ActiveX access to Excel:
When reading below the last row of an Excel sheet XLR8 ReadAny gives an error 1172 whereas using ActiveX Range.Value2 method gives just empty cells.
So with XLR8 I have to get the last row and set the correct range before attempting to read the range with XLR8.
Is there a way to handle such problems (attempting to read empty cells) in XLR8 internally?
Background:
I use ActiveX to read in configuration files created in Excel. Those configuration files have a variable number of rows, so I just read a sufficient high number of rows as I have to filter the read table anyway. No problem so far with ActiveX. When trying to migrate to XLR8 I now have to worry about the number of rows in my Excel sheets…
03-23-2015 06:20 AM
Hi GerdW,
when using the "Read Area" VIs you should be able to read any cells in a workbook, even below last row. Can you reproduce the issue in a simple VI so that we can trace it?
Thanks
03-23-2015 08:58 AM
Hi Peter,
attached a small routine for loading the attached XLS file. I try to read range A3:T263 from sheet "Inputs".
With "lastrow?"=FALSE it gives an error 1172, with lastrow=TRUE it reads the data…
The VI looks like this:
(In FALSE case the row constant is wired through the case.)
More interesting: when I read the range starting from A1 both cases work fine. So it's a combination of NOT starting to read in the most upper left cell AND exceeding the last row of the sheet…
03-24-2015 12:33 PM
Hi GerdW,
thanks for your detailed bug description! We were able to determine the bug, indeed this is a bug in the old format ".xls".
We will provide the bugfix in the upcomming version of XLR8!
Thanks,
Hajo
03-24-2015 02:18 PM
03-25-2015 04:20 AM
Hi GerdW,
you are right ;-)! The Ticket number for this bug is #802.
Greetings,
Hajo