Why does getAllData() read Excel file data incorrectly?
The origin and compare Excel file sheets cannot be compared by themselves, so the compare row is verified to exist in the origin.
By the way, when reading a compare row, why can’t I read an entire line?
In the following image,
the red data (210…) is reading and processing the values in the line directly below. Is this a Katalon error?
My code is in the following.
My goal is not to verify that the two sheets are identical, but to verify whether the contents of the COMPARE sheet are at ORIGIN or not.
I’ve already known that some rows in the COMPARE sheet may not be in the ORIGIN sheet. There are 50 more sheets to compare. All of these sheets may be the same or different.
However, there seems to be a problem with the getAllData() function. I hope you can confirm this.
When using getdAllData(), the last line of the COMPARE sheet was not printed. The reason is that the problem is that one row is not completely read, as verified in the screen shot below.
Your Excel sheets have a complex format; they are not as simple as Katalon’s builtin ExcelData class assumes. It assumes that a sheet has zero or one header row followed by a set of data rows in a uniform format. On the other hand, your sheet has a few internal "grid"s inside, each has a title part and a data part.
IMHO, you should not use the Katalon built-in ExcelData class. Rather you should use the Apache POI library directly so that your script can parse the sheet to recognize your sheet format correctly.You can import the Apache POI classes in your test case scripts. But, I am afraid, programming it requires some efforts.