Click to See Complete Forum and Search --> : Inserting Excel or CSV to Database


Brachole
05-05-2010, 10:43 AM
I'm looking for a good tutorial for doing this in with SQL Server. Basically, the webpage allows the user to locate their own Excel Spreadsheet or CSV file and insert the data into an already created table in the database.

The problem is that I don't know what their file look like as far as columns. I'm assuming I would need to match their columns with my table, somehow!

yamaharuss
05-06-2010, 11:51 AM
Google is your friend, you probably won't find a package to do this, you'll need to write it yourself.

I just created this very thing recently for a client - client uploads a txt or csv file, FSO reads the file and creates a temporary SQL db table based on the columns, then bulk inserts from the file into the table. Pretty slick.