Bug in API method GetRangeByName?


#1

We have in our code the following API call:

Aspose.Cells.Range rng = m_excel.Worksheets.GetRangeByName("dataRecords");

where the named range is from a saved excel file, and has rows selected. Since Excel allows 26*26 columns, we would expect that the rng.ColumnCount = 26*26, but instead returns 256, which appears to be max byte index. Also, why the property MaxColumn in Cells class is of byte type? any relations here?

Our aspose.cells.dll version is 4.0.1.4.

Chiawe.


#2

Could you please post a sample file to show your problem? How do you define the named range "dataRecords"?

Column index is zero based ( from 0 to 255). MaxColumn returns the max column index which contains cells with data or formattings. So it's byte type.