Cells Property Example

This example clears all cells on the specified spreadsheet.

Spreadsheet1.Cells.Clear

This example uses the default Item property of the Range object returned by the Cells property to reference a single cell. The example displays the row and column numbers for each cell in the range A1:E5.

For rw = 1 To 5
    For col = 1 To 5
        Spreadsheet1.Cells(rw, col).Value = "row " & rw & " column " & col
    Next
Next