Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Appending an excel file to an existing SQL db table

Status
Not open for further replies.

Elcin

Programmer
Nov 26, 2001
9
SA
Hello,
I need to find a way to append my SQL server table with information coming from an Excel file. This needs to be done very frequently, so I need to give the user the ability to do it from an asp page.

Any help is appreciated.

Elcin
 
Here's what to do in a general way :
#1 - In your asp page, create an excel application object like this :
Code:
  <%
  Dim ob_ExcelApp
  Set ob_ExcelApp = Server.createObject(&quot;Excel.application&quot;)
  %>
#2 - Then, open your xsl file in the previously created application
#3 - Get all infos you need in the cells of the xsl to put them in your DB.

For points #2 and #3, what I suggest is that you create a VBA macro in the Excel Application, run and test it under Excel and then get the VB code to adapt it to asp. Water is not bad as long as it stays out human body ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top