I want to pull all 6 of these tables from this website into my workbook. (vs All,vs PG,vs SG,vs SF,vs PF,vs C) When I try using the from web option in excel and selecting the table it just pulls in the headers. Why is that? Currently I have a paste now button and I goto the website, copy it and click the "Paste" button I created with a macro to clear current info and paste new values. I would like to eliminate me having to manually goto the website and copy the table. Is there another way to do it besides "From Web"
相关问题
- Scraping all mobiles of Flipkart.com
- Excel sunburst chart: Some labels missing
- Selenium in Java is not finding element when using
- How to filter out nodes with rvest?
- Error handling only works once
相关文章
- Get column data by Column name and sheet name
- Is there a google API to read cached content? [clo
- programmatically excel cells to be auto fit width
- Unregister a XLL in Excel (VBA)
- Unregister a XLL in Excel (VBA)
- Parsing complex HTML tables
- How to prevent excel from truncating numbers in a
- numeric up down control in vba
Make sure you are selecting the right table. There are two table elements. The first is just headers. The second is headers + info. I am not sure you can use this method to get all the tabs though as the URL doesn't change and the content is javascript updated. You can see whether the API has anything to offer though it is gate-kept by staff who want to speak to you before issuing an API key.
Any easy way is to go VBE > Tools > References > Add a reference to Microsoft Internet Controls then use Internet Explorer to navigate to the page.
You can use a CSS selector to target the table by its id and another CSS selector class selector to target all the tab links so as to click them to update the table for each tab.
If you don't want to use the clipboard to copy paste the table you can loop its rows and table cells within rows.