Hi,
I am trying to load an excel using Aspose.
Problem, I am not getting the column count which gives 0 but i can loop through the cells which has 10 rows for my excel.
Why am I not getting the column count?
Hi,
I am trying to load an excel using Aspose.
Problem, I am not getting the column count which gives 0 but i can loop through the cells which has 10 rows for my excel.
Why am I not getting the column count?
Hi,
Yes, I can notice the problem with the latest version:
Aspose.Cells
for .NET v6.0.1.6
However, you can get the right column count using the last cell as shown below.
We will fix the issue asap.
This bug has been logged as CELLSNET-29822.
I have also attached the source file and you can see the output below
C#
string path = @“F:\Shak-Data-RW\Downloads\source.xlsx”;
Workbook workbook = new Workbook(path);
Worksheet worksheet = workbook.Worksheets[0];
Debug.WriteLine(worksheet.Cells.Columns.Count);
Cell lastCell = worksheet.Cells.LastCell;
int columnCount = lastCell.Column + 1;
Debug.WriteLine(columnCount);