Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Posts
    1

    Unanswered: upload excel....

    How can i upload an excel file and the data in the excel file appear in the webpage and in database...using asp

  2. #2
    Join Date
    Jan 2003
    Location
    Midwest
    Posts
    138
    first you would need an upload component to upload the excel file...then you would need to create a connection to the excel file and finally you would need to query the contents of the excel file and display it.

  3. #3
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    First let's deal with the timeout issue which can be a problem if a user is uploading a fairly large file (although perhaps you don't want the timeout increased too much because you DON'T want a user uploading a large file).

    For pure ASP (i.e. non component) solutions (and I believe this would be true for component solutions too) can increase the timeout for the page:
    ' Script timeout in seconds for this page.
    ' (60 x 60 = 1 hour.)
    Server.ScriptTimeout = 60 * 60

    Also the Anonymous Internet user needs Change permission on the folder that a file is going to be uploaded to and actually Full Access might be better if you are later going to use the FileSystemObject to delete a file.

    Here is a resource for letting the user upload a file which is something that was unfortunately not built into ASP:

    ASP File Upload Using VBScript by John R. Lewis - 7/10/2000
    http://www.aspzone.com/articles/john/aspUpload

    And for connecting to the Excel file (assuming the first row contains the field names and it's in good table order:

    Able Consulting - ADO Connection String Samples
    http://www.able-consulting.com/ADO_Conn.htm
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

Posting Permissions

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