How To Import Excel Data In MsSql
Today, I want to talk about importing data from an excel file to MsSqlServer. Right click database, choose task and import data option. Browse the excel file and select the version of your excel file.
Then, select the destination database and tables.
After that, map the excel sheets and database tables, then map the excel columns and table columns. Click “edit mappings” and map the excel columns to table columns. And click next to run the data importing process. If you have any errors in the result of process, correct them and try it again.
Sometimes you cannot correct the errors and import the data. Especially if you have large amount of data such as a geometry, it is not possibble to do importing in this way. I will show you another option to insert your data to SqlServer. Just use formulation in excel and paste your excel cell formulas to query window in sqlserver and run it. This is an example of excel formula I use to import data.
="insert into person (name,surname,nation) VALUES ( '"&B2&"' , '"&C2&"', '"&D2&"')
You can have a look at my other post about Export Data In MsSql
If you have question do not forget to write from the chat button next to it or from the comment.