i have excel file like below
sno name fname dob empid epsal
1 raju ravi 15/05/1990 123 40000
upload Import Excel Sheet data into SQL Server using ASP . in different tables like..
table_a
sno name fname dob
1 raju ravi 15/05/1990
table_b
empid empsal
123 40000
plz write csharp code
Loading
Jacke ElisPosted Jan 20, 2015, 4:49 AM
I used this C# component for excel files, as you can see it can easily export a part of your excel file to a DataTable object.
Note that you can read both XLSX and XLS excel files in same manner with C#. After the conversion it is just a matter of how you prefer to write to a server. I used SqlBulkCopy as a straightforward solution, but this will depend on what you're actually trying to do.
shi lianghongPosted Jan 4, 2015, 3:53 AM
http://msdn.microsoft.com/en-us/library/ms140052.aspx