Results 1 to 4 of 4
  1. #1
    tssrshot is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    3

    Import to Access from Excel File created by ASP Page

    Big picture, I am trying to get Access to Import, regularly, an Excel Document which comes from an external ASPnet based website.



    I can do it manually, but going to the site, clicking the link, saving the Excel to my computer, and then importing to the Database.

    The problem is, I'm the only one who knows how to do that, and it needs to be user safe.
    We have about 40 High Visibility users (military guy here) and the site is completely managed by another agency who will not cooperate.

    I can get VBA to open a IE window but I can't get it to click the link or import the excel and have no way of knowing how ASPnet works to get a way around this pickle. The link I click says, in its source,

    javascript:__doPostBack('ctl00$mnuMain','Alpha Roster')>Alpha Roster</A>

    For a user, if he wants the Excel data, he goes to the site, logs in with his Smartcard via IE, and clicks on the link which pops up a request to save/open/cancel an Excel file. I've imported this to a table in our database, but the data gets out of date, immediately. The site the data comes from is from another branch of the government, so they WILL NOT assist us with an SQL connection or anything. They just say, "import every day, sorry!"Any advice would be GREAT! Any more information needed, please let me know!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Google: VB download Excel file from website

    Does this help http://www.cpearson.com/Excel/DownloadFile.aspx
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    tssrshot is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    May 2012
    Posts
    3
    I was thinking of that method in my original search...the hard part is getting the file as its not accessable directly. For instance, you can't go to URL://something.com/file.xls. You go to url://something.com/file.aspx and then click a link that opens the excel download dialog.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    So you need to open web page, search the page for URL string, and open it. Review http://us.generation-nt.com/answer/v...1358102.html#r
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 04-20-2012, 07:20 AM
  2. Import Excel file to Access
    By emmett in forum Import/Export Data
    Replies: 3
    Last Post: 04-06-2012, 05:27 AM
  3. Replies: 0
    Last Post: 12-08-2011, 09:12 AM
  4. Splitting an Excel File into Multiple Access Tables on Import
    By TheWolfster in forum Import/Export Data
    Replies: 4
    Last Post: 04-29-2010, 04:52 AM
  5. Replies: 0
    Last Post: 04-29-2009, 04:27 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums