How read groupped rows?


#1

I have big groupped xlsx price list. I try get data, but its show only headers.
Workbook wb = new Workbook(filename);
Worksheet ws = wb.Worksheets.First();
Cells cells = ws.Cells;
int last_row = ws.Cells.GetLastDataRow(0);
int maxdatarow = ws.Cells.MaxDataRow; // ==11

image.png (9.5 KB)


#2

@mesteruh,

Thanks for the screenshot.

Could you provide us template Excel file, we will check it soon.


#3

Цены.zip (2.9 MB)


#4

checked?..


#5

@mesteruh,

Thanks for the template file.

Well, there is an issue with your code, so you should correct it. Actually you are retrieving farthest/maximum data row of the first worksheet “Установите свою скидку” instead of “Прайс”. So, you may try the code segment as following:
e.g
Sample code:

Workbook wb = new Workbook(filename);
Worksheet ws = wb.Worksheets[1];
//Or
//Worksheet ws = wb.Worksheets["Прайс"];
Cells cells = ws.Cells;
int last_row = ws.Cells.GetLastDataRow(0);
int maxdatarow = ws.Cells.MaxDataRow; 

Let us know if you still find any issue.