Hello, I am using a loop to copy/ paste data from 0190.csv file (A column) to client (field 3, 30) in order to get
an internal reference appearing afterwards in client 3, 14 field.
My aim is to copy-paste data from client field 3, 14 to a new excel file.
I am able to move my cursor to that field (3, 14) but
do not how to collect (coy paste?) this data to a new excel file, ideally placed in the same Directory
"H:\Spain\Data_Collected.xls"
Here's my code fisrt lines...
If someone has an idea & an explanation on how to do this, I would be very interested.
Thanks,
Sub GET_DATA()
'
Dim Title, Default, fileloc, strLine, arrValues, fso, inputFileStream
Dim line As String
With Session
fileloc = "H:\Spain\0190.csv" ' Set default
Const conStrSeparator = ";"
Set fso = CreateObject("Scripting.FileSystemObject")
Set inputFileStream = fspenTextFile("H:\Spain\0190.csv", 1, False, 0)
Do Until inputFileStream.AtEndOfStream
strLine = inputFileStream.ReadLine
arrValues = Split(strLine, conStrSeparator)
.WaitForEvent rcKbdEnabled, "0", "1", 3, 58
.MoveCursor 3, 30 'campo REF de PODHIS
.TransmitTerminalKey rcIBMEraseEOFKey
.TransmitANSI arrValues(0)
.TransmitTerminalKey rcIBMPf1Key
.WaitForEvent rcKbdEnabled, "0", "1", 58, 8
.MoveCursor 3, 14 'CAMPO A COPIAR
an internal reference appearing afterwards in client 3, 14 field.
My aim is to copy-paste data from client field 3, 14 to a new excel file.
I am able to move my cursor to that field (3, 14) but
do not how to collect (coy paste?) this data to a new excel file, ideally placed in the same Directory
"H:\Spain\Data_Collected.xls"
Here's my code fisrt lines...
If someone has an idea & an explanation on how to do this, I would be very interested.
Thanks,
Sub GET_DATA()
'
Dim Title, Default, fileloc, strLine, arrValues, fso, inputFileStream
Dim line As String
With Session
fileloc = "H:\Spain\0190.csv" ' Set default
Const conStrSeparator = ";"
Set fso = CreateObject("Scripting.FileSystemObject")
Set inputFileStream = fspenTextFile("H:\Spain\0190.csv", 1, False, 0)
Do Until inputFileStream.AtEndOfStream
strLine = inputFileStream.ReadLine
arrValues = Split(strLine, conStrSeparator)
.WaitForEvent rcKbdEnabled, "0", "1", 3, 58
.MoveCursor 3, 30 'campo REF de PODHIS
.TransmitTerminalKey rcIBMEraseEOFKey
.TransmitANSI arrValues(0)
.TransmitTerminalKey rcIBMPf1Key
.WaitForEvent rcKbdEnabled, "0", "1", 58, 8
.MoveCursor 3, 14 'CAMPO A COPIAR