Posts: 2
Threads: 1
Joined: Dec 2015
HI, I want to create a macro in which I want to record few clicks and then load text as keyboard input in some window from each cell from column of excel on every repetition of this this macro.
how to load text from next cell from column each time macro is repeated?
plz help me to proceed
Posts: 2
Threads: 1
Joined: Dec 2015
tried loading excel and pasting text but getting this error: class ExcelSheet Excel.Worksheet'ws : ExcelRange ExcelRow ExcelColumn FE_ExcelSheet_Row __ExcelState
int w1=act(win("Downloads" "CabinetWClass"))
lef 296 162 w1 1 ;;tool bar 'Address: Downloads'
run "C:\Users\abhishek\Document\gmail.xlsx"
int hwndExcel=wait(30 WA "gmail")
ExcelSheet es.Init
str cell=es.Cell("A2")
paste cell
#endregion
Posts: 12,147
Threads: 143
Joined: Dec 2002
It is information, not error.
Instead of
str cell=es.Cell("A2"); paste cell
cell=es.Cell("A3"); paste cell
cell=es.Cell("A4"); paste cell
...
you can use array:
Macro
Macro2764
ExcelSheet es.Init
ARRAY(str) a; int i
es.CellsToArray(a "A:A")
for i 0 a.len
,paste a[0 i]
,key Y