Click here to Skip to main content
15,899,679 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi

Please tell me how i upload excel file in SQLServer . Please help me
Posted
Comments
Laiju k 27-Oct-14 2:25am    
Have you googled for that
Arora1992 27-Oct-14 2:30am    
yes But I didn't find the answer
Robert Welliever 27-Oct-14 2:26am    
It depends if you're using XLS or XLSX or both (each requires a different data adapter). What version of Excel are you supporting?
Arora1992 27-Oct-14 2:29am    
.xlsx
Robert Welliever 27-Oct-14 2:36am    
You have to use the OleDbDataAdapter with an excel connection string. You can query as if it were any other data table once set up. If you are just doing it once, it would be far easier to use Sql Server's SSIS to latch on and move the data. If you're creating an upload module so people can move data regularly via Excel to Sql Server, then it's best to write your own code using the OleDBDataAdapter. https://www.connectionstrings.com/excel-2007/ shows the connection string you need.

1 solution

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