Search code examples
sqlcsvxlsxxls

Import sheets from xls file into separate tables SQL


Is there a way to import excel file that has multiple sheets into a database? (each sheet is a separate table) Or Do I have to do that maunaly with csv?


Solution

  • Yes, when using Import Wizard you specify the source as Excel, the destination as your SQL DB and then select the sheet of the Excel workbook to use.

    Please be careful with Excel in the data mapping, Excel will 'auto choose' a data type based on the first 10 (?) rows. If you have a column with all numeric at the top, but then some text values later on that data will not load.