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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel to SQL Server 7 import macro?

Status
Not open for further replies.

sndkick

Programmer
Nov 1, 2000
71
US
Not quite sure it this can be done, but if possible can anyone point me in the right direction?

I have an ASP web app., and I am looking to create some sort of macro that will allow a user to upload an Excel spreadsheet directly into a table in SQL Server 7. The fields in the spreadsheet will already match up exactly, I am just looking to automate the SQL Server "Import Data..." utility if possible.

Can this be done? Can you point me in the right direction?

Any help would be greatly appreciated. Thanks.

scott
 

Create a DTS package to import the spreadsheet. Create a Job to run the package. From the ASP page start the Job using sp_start_job.

USE msdb
EXEC sp_start_job @job_name = 'Import Excel'

See SQL BOL for more details about DTS packages, Jobs and sp_start_job. Terry Broadbent
Please review faq183-874.

"The greatest obstacle to discovery is not ignorance -- it is the illusion of knowledge." - Daniel J Boorstin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top