Forum Moderators: open

Message Too Old, No Replies

Transfer data from Excel to Access using ASP

How to do it?

         

iloveu

1:46 am on Jun 29, 2005 (gmt 0)

10+ Year Member



I am going to write a ASP code (not .net) to import my excel file to Access database. Seems it is difficult to get useful information by Google. Can anyone tell where I should find relevent information?
Thanks.

KeywordROI

9:40 pm on Jun 29, 2005 (gmt 0)

10+ Year Member



I seem to remember that there is a data source that you can use with Excel in ASP (similar to the jet something for Acess). I think you have to give a certain area in Excel a name and then you can access it.

Good Luck

Prolific

9:54 pm on Jun 29, 2005 (gmt 0)

10+ Year Member



You can use MS Access itself to import the data. Use the import data wizard and point it at the excel file and it will let you map fields. Super easy :)

northbath

11:47 am on Jul 31, 2005 (gmt 0)



I am looking for a similar answer. I am working on a project for a friend that is stuck. I am teaching myself asp and it's running slow. All the data is in access, and he wants to display his spreadsheet on his site. Also, when data is sent to the database, he has to manually refresh his spreadsheet in order to display the new data that was just inputted. Is there a way to send data to a database and then transfer to excel and then come back to the site with one button (function) without manually refreshing?

mattur

12:38 pm on Jul 31, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



iloveu: I've done a similar thing, using an Excel file to batch upload products into a database using ASP. You can query an Excel spreadsheet or range via ADO the same way you can query an Access database. You need to use a slightly different OLE DB connection string and SQL syntax, eg:

strCnn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\your-excel-file.xls;Extended Properties=Excel 8.0;"

strSql = "SELECT * FROM [your-excel-sheet$];"

See Manipulate Excel Spreadsheet Data in ASP Using ADO [msdn.microsoft.com]

Northbath: it's possible to return data from an asp page to open in Excel, see How To Display ASP Results Using Excel in IE with MIME Types [support.microsoft.com]