September 30, 2010 at 10:35 pm
Can anyone tell me how to import an Excel spreadsheet into SQL so that the contents of the spreadsheet form an entire table in SQL please?
October 1, 2010 at 3:47 am
use the import wizard right click dbname =>tasks=>import choose excel as yr source and the the database as your target. This will create a table called sheet1$ i.e the name of yr worksheet.
It does have its problems though...it makes the best quess on the column types so if you have a mix and match of numbers with strings and if it decides its a number i.e float then the strings will come in as nulls and also with dates when sent in with dd/mm/yy format are they american or british ? best to make them dd mmm yyyy i.e month descriptor, that way there is no ambiguity . To get over this suggest u make all dates dd mmm yyyy and save spreadsheet as a tab delimited text file and then import text file again using wizard and choose flat file as yr source, everything comes in as nvarchar(255)
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply