We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

How to get the row and column index of current cell

Hello,

How could I get the row and column index of the current cell which the cursor stay?

Thanks,

Best Regards,

Candy

Hi Candy,

Thanks for your inquiry.

You can get the current cell at the position of the DocumentBuilder by using this code below:

Cell cell = (Cell)builder.CurrentNode.GetAncestor(NodeType.Cell);

To get the index of the Cell/Row please take a look at the code here. This should show you to achieve this. In this case you may need to get the Row and Table ancestor as well.

Thanks,