Jump to content
UBot Underground

Scraping Rows list total of spreadsheet


Recommended Posts

Hi all,

 

I'm working with a Google spreadsheet and what I need is to be able to scrape the number of rows that have data in them.

 

In this public spreadsheet you can see there are three rows: https://docs.google.com/spreadsheet/ccc?key=0ArxcY3eOFl_CdE41MzlZSFEyeEhaWGdqUlI2N3ZOd2c

 

I essentially need to return the value of the number of rows that have data in them.

 

I dont really want to download anything - I'd much rather scrape the information from the page.

 

Thanks for the help guys.

 

Kevin

Link to post
Share on other sites

Got a solution - and works quite well.

 

Here's the code:

clear list(%rows)
navigate("https://docs.google.com/spreadsheet/ccc?key=0ArxcY3eOFl_CdE41MzlZSFEyeEhaWGdqUlI2N3ZOd2c#gid=0", "Wait")
wait for browser event("Page Loaded", "")
wait(1)
add list to list(%rows, $scrape attribute(<class=w"g-0-*">, "innertext"), "Don\'t Delete", "Global")
wait(1)
set(#listtotal, $subtract($list total(%rows), 6), "Global")
wait(1)
set(#listtotal2, $divide(#listtotal, 6), "Global")

In the interests of cleaning up my code is there a better way to do this?

  • Like 1
Link to post
Share on other sites
  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...