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:
iam working on a project to import external excel sheet into a sql server.i need to know how to import field names from a excel sheet so that i can import data in corresponding fields in the sql server.
Posted
Comments
CodeReady 10-Jun-15 2:48am    
Have you googled it?

1 solution

try this.

Workbook workbook = new Workbook();
workbook.LoadFromFile(@”..\yourfile.xlsx”);
Worksheet sheet = workbook.Worksheets[0];
DataTable dt = sheet.ExportDataTable();

or may be below link will help you

https://github.com/ExcelDataReader/ExcelDataReader[^]
 
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