Jump to content
Sign in to follow this  
makogen

getting table data

Recommended Posts

makogen

is there a way to get the data from a table without loading the entire table into an array or searching through the HTML?

The reason I ask this is because I am trying to pull data from a table that takes over 5 mins to load into the array with _IETableWriteToArray and I would like to only take the first 60 or so rows instead of the entire 2000. Is there away to pull using the <td> tag already? or will I have to write in a new function in the IE.au3?

Share this post


Link to post
Share on other sites
Thatsgreat2345

HAHAHAHHA, well I was making it harder on myself then it actually was. Here it is

I would include the header but , I won't , I just added 2 extra parameters , the first one, number of tr tags to check, second, number of td tags to get data from

Recognize I re-saved IE.au3 as IE1.au3 with the new function.

It only works with transpose as true. So default transpose is true :D

Example:

#include <IE1.au3>
#include <Array.au3>
$oIE = _IE_Example ("table")
$oTable = _IETableGetCollection ($oIE, 1)
$aTableData = _IETableWriteToArray ($oTable, True, 2,2)
_ArrayDisplay($aTableData)oÝ÷ Ø[§rب«­¢+ÙÕ¹}%Q±]É¥ÑQ½ÉÉå
½Õ¹Ð¡  åIÀÌØí½}½©Ð°ÀÌØí}ÑɹÍÁ½ÍôQÉÕ°ÀÌØí¹Õµ}ÑÈô´Ä°ÀÌØí¹Õµ}Ñô´Ä¤(%%9½Ð%Í=¨ ÀÌØí½}½©Ð¤Q¡¸($%}}%ÉɽÉ9½Ñ¥ä ÅÕ½ÐíÉɽÈÅÕ½Ðì°ÅÕ½Ðí}%Q±]É¥ÑQ½ÉÉäÅÕ½Ðì°ÅÕ½ÐìÀÌØí}%MÑÑÕÍ}%¹Ù±¥ÑQåÁÅÕ½Ðì¤($%MÑÉÉ½È ÀÌØí}%MÑÑÕÍ}%¹Ù±¥ÑQåÁ°Ä¤($%IÑÕɸÀ(%¹%($ì(%%9½Ð}}%%Í=©QåÁ ÀÌØí½}½©Ð°ÅÕ½ÐíѱÅÕ½Ðì¤Q¡¸($%}}%ÉɽÉ9½Ñ¥ä ÅÕ½ÐíÉɽÈÅÕ½Ðì°ÅÕ½Ðí}%Q±]É¥ÑQ½ÉÉäÅÕ½Ðì°ÅÕ½ÐìÀÌØí}%MÑÑÕÍ}%¹Ù±¥=©ÑQåÁÅÕ½Ðì¤($%MÑÉÉ½È ÀÌØí}%MÑÑÕÍ}%¹Ù±¥=©ÑQåÁ°Ä¤($%IÑÕɸÀ(%¹%($ì(%1½°ÀÌØí¥}½±ÌôÀ°ÀÌØíÑÉÌ°ÀÌØíÑÈ°ÀÌØíÑÌ°ÀÌØí¥}½°°ÀÌØí¥}ɽÝÌ°ÀÌØí½°°ÀÌØíɽܰÀÌØí¥}ÑÉ}½Õ¹ÐôÄ°ÀÌØí¥}Ñ}½Õ¹ÐôÄ($ÀÌØíÑÉÌôÀÌØí½}½©Ð¹É½ÝÌ(%½ÈÀÌØíÑÈ%¸ÀÌØíÑÉÌ($$ÀÌØíÑÌôÀÌØíÑȹ±±Ì($$ÀÌØí¥}½°ôÀ($%½ÈÀÌØíÑ%¸ÀÌØíÑÌ($$$ÀÌØí¥}½°ôÀÌØí¥}½°¬ÀÌØíѹ½±MÁ¸($%9áÐ($%%ÀÌØí¥}½°ÐìÀÌØí¥}½±ÌQ¡¸ÀÌØí¥}½±ÌôÀÌØí¥}½°((%9áÐ($ÀÌØí¥}ɽÝÌôÀÌØíÑÉ̹±¹Ñ (%1½°ÀÌØí}Q±
±±ÍlÀÌØí¥}½±ÍulÀÌØí¥}ɽÝÍt($ÀÌØíɽÜôÀ(%½ÈÀÌØíÑÈ%¸ÀÌØíÑÉÌ($$ÀÌØíÑÌôÀÌØíÑȹ±±Ì($$ÀÌØí½°ôÀ($%½ÈÀÌØíÑ%¸ÀÌØíÑÌ($$$ÀÌØí}Q±
±±ÍlÀÌØí½±ulÀÌØíɽÝtôÀÌØíѹ¥¹¹ÉQáÐ($$$ÀÌØí½°ôÀÌØí½°¬ÀÌØíѹ½±MÁ¸($%9áÐ($$ÀÌØíɽÜôÀÌØíɽܬÄ(%9áÐ(%%ÀÌØí}ÑɹÍÁ½ÍQ¡¸($%%ÀÌØí¹Õµ}ÑÈô´ÄQ¡¸($$$ÀÌØí¹Õµ}ÑÈôU ½Õ¹ ÀÌØí}Q±
±±Ì°Ä¤($%¹%($%%ÀÌØí¹Õµ}Ñô´ÄQ¡¸($$$ÀÌØí¹Õµ}ÑôU  ½Õ¹ ÀÌØí}Q±
±±Ì°È¤($%¹%($%1½°ÀÌØí¥}ÄôÀÌØí¹Õµ}ÑÈ°ÀÌØí¥}ÈôÀÌØí¹Õµ}Ñ°ÀÌØíQµÁlÀÌØí¥}ÉulÀÌØí¥}Åt($%½ÈÀÌØí¤ôÀQ¼ÀÌØí¥}È´Ä($$%½ÈÀÌØí¨ôÀQ¼ÀÌØí¥}Ä´Ä($$$$ÀÌØíQµÁlÀÌØí¥ulÀÌØí©tôÀÌØí}Q±
±±ÍlÀÌØí©ulÀÌØí¥t($$%9áÐ($%9áÐ($$ÀÌØí}Q±
±±ÌôÀÌØíQµÀ(%¹%(%MÑÉÉ½È ÀÌØí}%MÑÑÕÍ}MÕÍ̤(%IÑÕɸÀÌØí}Q±
±±Ì)¹Õ¹
Edited by Thatsgreat2345

Share this post


Link to post
Share on other sites
makogen

OMG the code looks so beautiful ^^;

I'm sorry can you explain it to me so I can better understand it?

I'm a little n00b...:D

IT WORKS SO WELL!!! THANK YOUUUU!!!

Edited by makogen

Share this post


Link to post
Share on other sites
Thatsgreat2345

OMG the code looks so beautiful ^^;

I'm sorry can you explain it to me so I can better understand it?

I'm a little n00b...:D

IT WORKS SO WELL!!! THANK YOUUUU!!!

It is just a modification of DaleHolms don't give me the credit lol. Basically it uses COM objects. It grabs all the <TR> tags, and gets how many TDs are in each TR. Then it goes through each TR, and gets the TD Data. Then it checks if it should transpose or not. Then it organizes them all.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×