sql server - How to import Excel data using SQL Query (without wizard)? -


say have thousands of excel files people's information.

name height john  182 sam   178 ... 

if want import these data new ms-sql database table using sql query, how should that?

name  weights john  130 sam   160 ... 

and if want append 'weights' data previous table using query, how should that?

the reason i'm doing because import excel using wizard can lead huge waste of time, i'm thinking if can embed sql query in matlab, loop job me, hopefully.

thank in advance.

you can use openrowset import excel table

example :

insert yourtable ( . . . ) select  . . .     openrowset('microsoft.ace.oledb.12.0',         'excel 12.0;database=c:\excel\excelfile.xlsx',          'select * [sheet1$]') 

Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -