Cell Position / Formatting multiple selected cells

I am evaluating Aspose.Grid and have two questions:

How to get the row and column number of the active (selected) cell?

How can a selection of cells being formatted, for example change their font setting?

Thanks for the help

Oliver

Hi Oliver,

Please check the relevant code snippets for your queries:

How to get the row and column number of the active (selected) cell?

Dim sheet As Aspose.Grid.Desktop.Worksheet = Me.GridDesktop.GetActiveWorksheet()

Dim cl As CellLocation = sheet.GetFocusedCellLocation()

Dim row as integer = cl.Row

Dim col as integer = cl.Column

How can a selection of cells being formatted, for example change their font setting?

Dim range As CellRange = GridDesktop1.Worksheets(0).GetLastSelection()

Dim font As Font = New Font("Arial", 12, FontStyle.Bold)

For i As Integer = range.StartRow To range.EndRow

For j As Integer = range.StartColumn To range.EndColumn

GridDesktop1.Worksheets(0).Cells(i, j).SetFont(Font)

Next

Next

Thank you.