Get Max Column Index in Row and Max Row Index in Column with Golang via C++

Possible Usage Scenarios

When you only need to manipulate some data on the rows or columns, you need to know the data range of rows and columns. Aspose.Cells offers this feature. To obtain the maximum column index on a row, you can obtain the Row.GetLastCell() and Row.GetLastDataCell() properties, and then use the Cell.GetColumn() property to obtain the maximum column index and maximum data column index. But in order to obtain the maximum row index and maximum data row index on a column, you need to create a range on the column, then traverse the range to find the last cell, and finally obtain the Cell.GetRow() attribute of the cell.

Aspose.Cells provides the following properties and methods to help you achieve your goals.

Get Max Column Index in Row and Max Row Index in Column using Aspose.Cells

This example shows how to:

  1. Load the sample file.
  2. Get the row whose maximum column index and maximum data column index you need.
  3. Retrieve the Cell.GetColumn() attribute of the cell.
  4. Create a range based on the column.
  5. Obtain an iterator and traverse the range.
  6. Retrieve the Cell.GetRow() attribute of the cell.