Scrape multiple lines in one go
Scrape multiple lines in one go
(OP)
hi all,
i have a quick question which i can't find the answer to. i use excel often to scrape info from extra and its either a few strings or a single line of info.
Recently i've had to scrape multiple lines (10-15 per page) on multiple pages (up to 300). my question is, is there a way of capturing multiple lines of a page.
thanks,
something like:
Print #1, MyScreen.area(8, 1, 22, 80)' get multiple rows
this is the kind of loop i use now.
Do
Do Until Z > 22
If Trim(MyScreen.area(Z, 1, Z, 80)) <> vbNullString Then Print #1, MyScreen.area(Z, 1, Z, 80)
Z = Z + 1
Loop
Z = 10
KeyW "<PF2>"' next screen
Loop Until MyScreen.area(24, 42, 24, 57) = "INQUIRY COMPLETE"
i'm hoping to speed up the capture of data, any help/advice would be great.
jazznaura
i have a quick question which i can't find the answer to. i use excel often to scrape info from extra and its either a few strings or a single line of info.
Recently i've had to scrape multiple lines (10-15 per page) on multiple pages (up to 300). my question is, is there a way of capturing multiple lines of a page.
thanks,
something like:
Print #1, MyScreen.area(8, 1, 22, 80)' get multiple rows
this is the kind of loop i use now.
Do
Do Until Z > 22
If Trim(MyScreen.area(Z, 1, Z, 80)) <> vbNullString Then Print #1, MyScreen.area(Z, 1, Z, 80)
Z = Z + 1
Loop
Z = 10
KeyW "<PF2>"' next screen
Loop Until MyScreen.area(24, 42, 24, 57) = "INQUIRY COMPLETE"
i'm hoping to speed up the capture of data, any help/advice would be great.
jazznaura
RE: Scrape multiple lines in one go
hi,
It is my preference. I scrape the entire screen, in my case a 3270 emulation of 24 x 80.
CODE
Furthermore, I have built a screen map table that discribes the data on each row, like
ScrNam FIELD FR TR CL LN TYP
AP412431 ScrName 1 1 3 8 CHAR
AP412431 ScrDesc 1 1 11 50 CHAR
AP412431 SysDte 1 1 61 8 CHAR
AP412431 SysTme 1 1 70 8 CHAR
AP412431 Page 2 2 75 4 NUM
AP412431 Part Number 3 3 17 16 CHAR
AP412431 Nomen 3 3 36 16 CHAR
AP412431 TRAVELER 7 19 3 7 CHAR
AP412431 Status 7 19 10 1 CHAR
AP412431 CNF 7 19 11 3 CHAR
AP412431 ActQty 7 19 15 5 NUM
AP412431 PC 7 19 21 2 CHAR
AP412431 LC 7 19 24 2 CHAR
AP412431 PlnINWK 7 19 27 4 NUM
AP412431 PlnCOMP 7 19 32 4 NUM
AP412431 MRP Need 7 19 37 4 NUM
AP412431 Type 7 19 43 1 CHAR
AP412431 C_OP 7 19 47 4 CHAR
AP412431 C_CC 7 19 52 3 CHAR
AP412431 C_LC 7 19 56 6 CHAR
AP412431 LstMov 7 19 63 4 NUM
AP412431 HldCds 7 19 68 5 CHAR
AP412431 QMS 7 19 74 1 CHAR
AP412431 NetGrp 7 19 76 4 CHAR
AP412431 MSG 22 22 2 78 CHAR
This table descrie everything I need to properly parse my sData string and assign the value to the proper data type.
Skip,
Just traded in my old subtlety...
for a NUANCE!
RE: Scrape multiple lines in one go
i'll give this a go tomorrow, can I ask do you use this method because you found it to be the most efficient ? speed wise.
I also like the idea of the screen map, would be useful when coming back to a project to build addons.
RE: Scrape multiple lines in one go
I have ONE routine for scraping any screen, not one routine for each screen.
I can set up the data in a matter of a few minutes and be ready to roll. THAT is what is fast.
Skip,
Just traded in my old subtlety...
for a NUANCE!
RE: Scrape multiple lines in one go