foreclosure.com get data from web to excel multiple pages in single sheet

113 views Asked by At

I'm trying to get data from "https://foreclosureindia.com/bank-auctions/visakhapatnam/1" into an excel sheet. Reason being this website doesn't give an option to filter nor sort which is very annoying. I have emailed them number of times but no use.

So I decided to use excel and use import data from web option to get data in excel and there I can sort and filter. But the problem is there are over 100 pages or more I don't know the eaxct number.

https://foreclosureindia.com/bank-auctions/visakhapatnam/1

https://foreclosureindia.com/bank-auctions/visakhapatnam/2 so on...

is there a way so that I can get data from all pages at once in a single sheet excel or google sheets is fine.

Flie link - https://docs.google.com/spreadsheets/d/145HZpqbaee7u-YZLfBF80draX1tcim5y/edit?usp=sharing&ouid=105708123719345067145&rtpof=true&sd=true

1

There are 1 answers

1
Zen Leow On

My way is rather long-windedly techy so not sure if in your comfort zone.

I would write a program that loops HTTPRequest calls to get the output from https://foreclosureindia.com/bank-auctions/visakhapatnam/$num where $num is an incremental numerical value starting from 1.

code logic will read the output and extract out everything inside "<table" to "" and save it to a file or just as a variable in memory first. keep appending the tables for each incremented page until there's an output that has no tags which marks the end of the list of pages.

Then come up with the correct loop structure to go through all the tags and use something like Apache POI library to inject the values into excel document.

Good luck.

Regards, Zen