02-10-2015, 09:12 AM
Please read ExcelSheet.GetRangeInfo help, it will give most answers. Click GetRangeInfo in code and press F1.
Macro Macro2494
Macro Macro2494
ExcelSheet y.Init
int usedColumn1 usedColumnCount
y.GetRangeInfo("<used>" usedColumn1 0 usedColumnCount)
out F"{usedColumn1} {usedColumnCount}"
;select cell in the first unused column in the selected row
int row1
y.GetRangeInfo("<sel>" 0 row1)
y.SelectCell(usedColumn1+usedColumnCount row1)
act "Excel"