Click here to Skip to main content
15,896,727 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Am trying to Import Data from excel to Sql server using C# in ASP. NET. I have to give client side options to browse and upload excel file data to Sql server tables.I don't have write permission on Production Web Server, where the Application will be hosted on IIS Server. So, I cannot use FileUpload where excel sheet will be first saved in in Server Path and then use BulkReader.Please suggest me any alternative way to achieve this. Thanks!
Posted

Slower solution without bulk upload - loop through data, build insert queries and insert data.
 
Share this answer
 
v2
store data to datatable from excel then upload to sqlserver using bulk insert.
follow the link:
http://jubayerdevs.blogspot.hk/2013/10/store-excel-data-to-datatable-and-copy.html[^]
 
Share this answer
 
Comments
ArijitGhosh 2-Feb-14 4:03am    
Hi thanks for your reply. But wanted to know if there is a way to load the datatable from the client sided excel sheet on the fly? i.e. without saving the excel sheet on the Web server.
Ahmed Jubayer 2-Feb-14 7:10am    
You have to save the file in the server.if you don't want to then you can delete the file after the ends of the task.

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