In my spreadsheet, the columns A, B, C contain some text. I use the following code to clear them.
With ThisComponent.Sheets.GetByName(SheetName_Res)
.Columns(0).ClearContents(com.sun.star.sheet.CellFlags.STRING)
.Columns(1).ClearContents(com.sun.star.sheet.CellFlags.STRING)
.Columns(2).ClearContents(com.sun.star.sheet.CellFlags.STRING)
End With
Generaly it’s OK, but seems too long and not optimal. Is it possible to manage it with one line of code? Something analogical to this statement in MS Excel:
With Sheets(SheetName_Res)
.Range(.Columns(1), .Columns(3)).ClearContents
End With