Click here to Skip to main content
15,919,613 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more: , +
C#
how to import excel sheet in sql server using query


1. Like in excel have 3 sheets (emp, manager, dept) and these sheets have their own columns and data.

2. So the manner to insert data from excel to sql's table is like sheetName same as sql TableName & their data.

3.and I do not run query three times means when we run query/script they insert these 3 table ...or many more.

What I have tried:

SQL Server Helper - Tips and Tricks - Query and Import an Excel File
Posted
Updated 25-Oct-16 7:37am
Comments
Wendelius 25-Oct-16 13:49pm    
If you have tried OPENROWSET, what was the problem with that?

1 solution

Here is good documentation around using Distributed Queries
Questions About Using TSQL to Import Excel Data You Were Too Shy to Ask - Simple Talk[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900