Hi everyone,
I am a corporate employee in Central Europe. Everyday I'm doing VBA macros for Excel, or Access, which simplifies my office work. I often have to manually enter a large amount of data (even 1000 records) from the Excel table to the system using IBM Personal Communications, which takes a lot of time. Now I've done this by formatting the files using VBA on the pcomm macro format, which look like below
[sub]Description =
"60859147
[tab field]
"1
[tab field]
[tab field]
"60859146
[tab field]
"3
[tab field]
[tab field]
"60858824
[tab field]
"130
[tab field]
[tab field]
"60858826
[tab field]
"108
[tab field][/sub]
I know to use a macro file in VBscript format and then the file looks like this, but I do not know how to get variables from the xls or csv file
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)
REM This line calls the macro subroutine
subSub1_
sub subSub1_()
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "60859147"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[esc]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "1"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[esc]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "60859146"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[esc]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "3"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[esc]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "60858824"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[esc]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "130"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[esc]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "60858826"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[esc]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "108"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[esc]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "#[[[B"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[newline]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "tt"
end sub
how to look, macro vbscript to have indexes and the number downloaded from * .xls or * .csv file
Additionally, after each [tab] check if there was no message on the tap, if there is no message, skip [esc] and go to the number, if the message [esc] is present. The Excel file format looks like in the attachment.
screen with a message
screen without a message
Thank you for your help
I am a corporate employee in Central Europe. Everyday I'm doing VBA macros for Excel, or Access, which simplifies my office work. I often have to manually enter a large amount of data (even 1000 records) from the Excel table to the system using IBM Personal Communications, which takes a lot of time. Now I've done this by formatting the files using VBA on the pcomm macro format, which look like below
[sub]Description =
"60859147
[tab field]
"1
[tab field]
[tab field]
"60859146
[tab field]
"3
[tab field]
[tab field]
"60858824
[tab field]
"130
[tab field]
[tab field]
"60858826
[tab field]
"108
[tab field][/sub]
I know to use a macro file in VBscript format and then the file looks like this, but I do not know how to get variables from the xls or csv file
[PCOMM SCRIPT HEADER]
LANGUAGE=VBSCRIPT
DESCRIPTION=
[PCOMM SCRIPT SOURCE]
OPTION EXPLICIT
autECLSession.SetConnectionByName(ThisSessionName)
REM This line calls the macro subroutine
subSub1_
sub subSub1_()
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "60859147"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[esc]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "1"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[esc]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "60859146"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[esc]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "3"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[esc]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "60858824"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[esc]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "130"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[esc]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "60858826"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[esc]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "108"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[esc]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[tab]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "#[[[B"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "[newline]"
autECLSession.autECLOIA.WaitForInputReady
autECLSession.autECLPS.SendKeys "tt"
end sub
how to look, macro vbscript to have indexes and the number downloaded from * .xls or * .csv file
Additionally, after each [tab] check if there was no message on the tap, if there is no message, skip [esc] and go to the number, if the message [esc] is present. The Excel file format looks like in the attachment.
screen with a message
screen without a message
Thank you for your help