I’m trying to change the alignment of all columns to left and so far I was unable to archieve that.
I tried the following:
oColumn.setPropertyValue("AlignLeft", true)
oColumn.Align = 1
oCell.setPropertyValue("AlignLeft", true)
oCell.Align = 1
Code snippet:
'Find the last used column'
oCellCursor.gotoEndOfUsedArea(True)
oCellRangeAddress = oCellCursor.getRangeAddress()
lEndColumn = oCellRangeAddress.EndColumn
for lColumnNumber = lEndColumn to 1 step -1
oCell = oSheet.getCellByPosition(lColumnNumber, 0)
oColumn = oSheet.Columns.getByIndex(lColumnNumber)
oColumn.setPropertyValue("AlignLeft", true)
next lColumnNumber