+ Reply to Thread
Results 1 to 3 of 3

Importing text data from the web

  1. #1
    Lawood
    Guest

    Importing text data from the web

    With Excel 2003 I am importing data from the WEB. This works fine if the file
    exists, but not if it doesn't. I would like my macro to be able to handle
    both cases. Guess what I am asking is there a way to check and see whether
    or not a file exists so I can handle it accordingly.

  2. #2
    Steve Yandl
    Guest

    Re: Importing text data from the web

    If you create the object "MSXML2.XMLHTTP", there is a GET method that will
    return status text (OK if the URL is available).

    For an example in script that can easily be incorporated into your VBA, take
    a look at
    http://www.microsoft.com/technet/scr...5/hey0222.mspx

    Steve



    "Lawood" <[email protected]> wrote in message
    news:[email protected]...
    > With Excel 2003 I am importing data from the WEB. This works fine if the
    > file
    > exists, but not if it doesn't. I would like my macro to be able to handle
    > both cases. Guess what I am asking is there a way to check and see
    > whether
    > or not a file exists so I can handle it accordingly.




  3. #3
    Lawood
    Guest

    Re: Importing text data from the web

    Thanks. This worked fine. Maybe not significant but I noticed this process
    does not ask for my Web Site USERID/PASSWORD (the web site data is returned)
    whereas the Import data does.

    "Steve Yandl" wrote:

    > If you create the object "MSXML2.XMLHTTP", there is a GET method that will
    > return status text (OK if the URL is available).
    >
    > For an example in script that can easily be incorporated into your VBA, take
    > a look at
    > http://www.microsoft.com/technet/scr...5/hey0222.mspx
    >
    > Steve
    >
    >
    >
    > "Lawood" <[email protected]> wrote in message
    > news:[email protected]...
    > > With Excel 2003 I am importing data from the WEB. This works fine if the
    > > file
    > > exists, but not if it doesn't. I would like my macro to be able to handle
    > > both cases. Guess what I am asking is there a way to check and see
    > > whether
    > > or not a file exists so I can handle it accordingly.

    >
    >
    >


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