September 21, 2007 at 7:56 am
Hi,
I need to create a page where the client will upload the excel sheet. Once the document is uploaded, I need to read the document to see if the format looks good. Then I have to load the data from excel to a table in the database. I knew that we can upload the documents to a web server and open the file and read its contents. I am looking for a way to upload the contents of file all at once by using a DTS package inside the code. But I am not sure how to do that. If you have any idea please let me know or if you think of some other better way please let me know.
Thanks,
sridhar.
September 21, 2007 at 9:03 am
Gone are the days of DTS. SSIS is here.
It is very easy to create a package to load Excel. See the Excel source adapter in your tool box. Create the source, create the destination.
To execute the package through code, search google - they are many sites showing how.
HTH
Cheers,CrispinI can't die, there are too many people who still have to meet me!It's not a bug, SQL just misunderstood me!
September 21, 2007 at 6:51 pm
Unless the worksheet is protected against mistakes like adding an unexpected column or hitting the space-bar to "delete" data, you may get some wildly unexpected results and failures using Excel as a "front-end". I'd write a little VBS ("Macro on steriods" for the uninitiated ) in the spreadsheet to validate and isolate the correct data and then push the data into the database.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply