+ Reply to Thread
Results 1 to 4 of 4

webscrape file download hangs up in sending to folder

  1. #1
    Registered User
    Join Date
    09-22-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    38

    webscrape file download hangs up in sending to folder

    I'm a bit lost on why this particular code gets hung up, it's supposed to webscrape for .xlsm files that reside via a particular api path. I'm trying to have the code go through a list of identifiers/variables, build the urls and download the file and store it locally.

    It seems to get hung up in the Docxlsm.send part, or at least when I interrupt the process that's where the debug/error sends me. This particular code I have modified from another webscrape tool I built , but it was for a different api and it was downloading csv files, not .xlsm, and it works fine.

    Please Login or Register  to view this content.
    Another secondary challenge: I've seen it done before but i do not know how to establish it. I know for the list of my identifiers certain ones will not yield a downloadable .xlsm file because it doesn't exist yet. how can i instruct this process to continue down the list, and keep a record or log of the identifiers that don't retrieve anything, or at least cause a problem?

    Any help in further understanding is greatly appreciated.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: webscrape file download hangs up in sending to folder

    Your first question!
    The code does not hang up, though it may seem it does. It is just slow to download as the file has lots of tables with merged cells.

    This object might be faster.
    Try

    Set Docxlsm = CreateObject("MSXML2.XMLHttp")

    Instead of

    Set Docxlsm = CreateObject("WinHTTP.WinHTTPRequest.5.1")
    Last edited by AB33; 08-31-2017 at 11:46 AM.

  3. #3
    Registered User
    Join Date
    09-22-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: webscrape file download hangs up in sending to folder

    Thank you! It works!

    yes I needed to be a bit more patient, I was used to my csv scraper performing relatively fast. Thanks for helping me understand the process in the background.

  4. #4
    Registered User
    Join Date
    09-22-2011
    Location
    New Jersey
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: webscrape file download hangs up in sending to folder

    Although I also wanted to implement an error log.... in my sample there were some identifiers that don't produce an xlsm file..... however in the download folder there are 'file place holders' which contain nothing or don't open. I can easily sort by files size and eliminate the errors. Thanks again.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Sending A Word File With Hyperlinks Which Are Linked To The Files In A Folder
    By zanshin777 in forum Word Formatting & General
    Replies: 3
    Last Post: 08-04-2016, 06:40 PM
  2. Download internet file to the specific folder
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-07-2015, 08:17 AM
  3. macro to download file into unique folder based on cell value
    By mlicurse in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-11-2014, 01:25 PM
  4. Saving CSV file and sending to a folder over and over again
    By scottymelloty in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-14-2009, 08:56 AM
  5. Download data from folder
    By Sharp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-25-2008, 05:03 AM
  6. download files in folder
    By Sharp in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-22-2008, 11:54 AM
  7. Replies: 1
    Last Post: 08-23-2005, 02:05 PM

Tags for this Thread

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.6.0 RC 1