Search code examples
sqlexceldatabasesql-server-2008import-from-excel

How to import data from the 2nd sheet of an excel file, to SQL database


I have an Excel file that has several sheets, I want to import the data from the 2nd sheet but only the first 2 columns. I use SQL Server Management Studio. How can I do this?


Solution

  • Use the import data tool that comes with SQL Server Management Studio, in the wizard you will get to a section where you can map the sheet to a table. You can select the drop down by the sheet and select the second sheet and then map this to a table. Next you will click edit mappings on the bottom right and select only the two columns you would like.