importing excel sheet to SQL 7.0

Results 1 to 2 of 2

Thread: importing excel sheet to SQL 7.0

  1. #1
    mercury Guest

    Default importing excel sheet to SQL 7.0

    I have a project where I need to do the following.<BR><BR>1. From the website the user should be able to upload a .xls file to the web server.<BR><BR>2. Open that .xls file on the browser .<BR><BR>3. Then the .xls data should be imported to the Sql 7.0 through ASP code.<BR><BR>Can we do all these with ASP and I guess my question is can anyone tell me where I can get some info regarding this?<BR>Thank you in advance and have a great day!!!

  2. #2
    Join Date
    Dec 1969

    Default RE: importing excel sheet to SQL 7.0

    One way to do this would be to upload the file, open it as a database thus...cnstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & filepath & localfile & filext & ";Extended Properties=Excel 8.0;Persist Security Info=False"<BR>cn.Open cnstr, use getrows to put the data into an array, and loop through the array doing inserts into your database.<BR><BR>You could probably do something with bcp, but it would be messy. I&#039ll be interested to see if anybody has some better methods as I&#039m doing something very similar in one of my apps.<BR>

Posting Permissions

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