+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 15 of 18

Thread: Import data from a web page

  1. #1
    Registered User
    Join Date
    08-18-2011
    Location
    Denver Colorado
    MS-Off Ver
    Excel 2007
    Posts
    57

    Import data from a web page

    I have no experience pulling data from a web page to import to excel. I've borrowed some code I found here, but am stuck on how to proceed once I reach the website. I've attached the spreadsheet, as well as a word document showing my desires. Any and all help will be HUGELY appreciated!

    1. sub Import() needs to make elections before running report. Using the link, copy and paste the table to Summary.

    2. Using the links in the table, prompt the user for a location to save each .CSV with a unique name, then sub combinespreadsheets() populates Master.

    3. Would like a worksheet change event on Aging inventory D2 to filter Master by column L including blanks, hide the columns in sub CreateAgingList(), then paste the visible cells back to Aging Inventory
    Attached Files Attached Files
    Last edited by Hoosaskin; 12-13-2011 at 09:19 AM. Reason: added ZIP file

  2. #2
    Forum Guru Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,023
    Not all forums are the same - seek and you shall find

  3. #3
    Registered User
    Join Date
    08-18-2011
    Location
    Denver Colorado
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Import data from a web page

    Didn't really help. Can anyone help me out?

  4. #4
    Forum Guru Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,023

    Re: Import data from a web page

    Reading the very first part of your question "am stuck on how to proceed once I reach the website" those links i gave you are to code that actually gets data from websites, one of them shows you how to fill in name boxes..etc, so if you look carefully at the code i'm sure it would help. Also there aren't any attachments in your first post
    Not all forums are the same - seek and you shall find

  5. #5
    Registered User
    Join Date
    08-18-2011
    Location
    Denver Colorado
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Import data from a web page

    Two files contained within the ZIP file.

  6. #6
    Registered User
    Join Date
    08-18-2011
    Location
    Denver Colorado
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Import data from a web page

    I could really use some help. My attempt at a web query was a bust.

  7. #7
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & read 2007
    Posts
    15,979

    Re: Import data from a web page

    Hello Hoosaskin,

    Because the URL is an intranet and internet address, we can not access the site or web page. To help you, you will need to save the page source as a text file and post it (IE menu: View > Source).
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  8. #8
    Registered User
    Join Date
    08-18-2011
    Location
    Denver Colorado
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Import data from a web page

    Here 3 files showing what the pages looks like, as well as their source code.
    Run report is first, then get to table and inventory
    Attached Files Attached Files
    Last edited by Hoosaskin; 01-09-2012 at 10:01 AM.

  9. #9
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & read 2007
    Posts
    15,979

    Re: Import data from a web page

    Hello Hoosaskin,

    Thank you for posting all that information. That is exactly what I was looking for. I am currently writing the code to automate copying the data to the worksheet. Just wanted to let you know what is happening.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  10. #10
    Registered User
    Join Date
    08-18-2011
    Location
    Denver Colorado
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Import data from a web page

    Thank you for your time!

  11. #11
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & read 2007
    Posts
    15,979

    Re: Import data from a web page

    Hello Hoosaskin,

    I need to know if the sample HTML files are exact copies from the web pages. I have most of the code written but Internet Explorer fails to retrieve the files from my hard drive. I can open the files fine with FireFox and Chrome. If the files are the exact copies then perhaps once you are logged on then Internet Explorer will work. This is a something I have never come across before.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  12. #12
    Registered User
    Join Date
    08-18-2011
    Location
    Denver Colorado
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Import data from a web page

    Hi Leith,

    The source codes I sent are complete for each page. I did toy with removing some of the blank spaces between the lines, to make the files smaller, but didn't change anything other than the margins in the documents.

    Sean

  13. #13
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & read 2007
    Posts
    15,979

    Re: Import data from a web page

    Hello Sean,

    It is so nice to Sean spelled as it is in the Gaelic. I feel confident that once you are logged on Internet Explorer the macro will work correctly. I do have another question. When the report is run and I am assuming you want the entire process automated, the choices listed in the Word file will be the same for all users, yes?
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  14. #14
    Registered User
    Join Date
    08-18-2011
    Location
    Denver Colorado
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Import data from a web page

    Is there any other way to spell Sean?!?!? I think not!

    When making the request to run the report, I'd like the user to be prompted for the Station ID only. All other choices should be as marked below.

    1. View data as of: accept default
    2. Show report for: change National to Select Stations
    3. Prompt for station number
    4. Use Status: accept default
    5. Equipment type: change to All
    6. Category Stock Number: accept default
    7. Run report

    I'm not sure what affect selecting other than 554 as station ID (for me) will have on the source code of the subsequent web pages. Would you like to see the code if I use another choice?

    Sean

  15. #15
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & read 2007
    Posts
    15,979

    Re: Import data from a web page

    Hello Sean,

    Thanks for the clarification. If you can post the page for comparison that would be great. It will certainly head off any problems.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.2.0