I was trying to Take the Data from excel and if I wanted to check the validation there was a problem occurring like matching the header content to detailed can someone help me to get it resolved
Loading
I was trying to Take the Data from excel and if I wanted to check the validation there was a problem occurring like matching the header content to detailed can someone help me to get it resolved
Know the answer? Post it. Somebody with the same question will find it here.
Srinivasan RamamoorthiRank #877 · 2.5K reputationPosted Dec 14, 2021, 9:29 AM EST
Leon DRank #851 · 2.6K reputationPosted Dec 14, 2021, 8:14 PM EST
Alternatively, you can use Free Spire.XLS library to read and manipulate Excel files:
https://www.e-iceblue.com/Introduce/free-xls-component.html (also available on nuget)
Here is a basic example for reading data from Excel:
Workbook workbook = new Workbook(); workbook.LoadFromFile("WriteExcel.xlsx"); Worksheet sheet = workbook.Worksheets[0]; int maxRow = sheet.LastRow; int maxColumn = sheet.LastColumn; for (int row = 1; row <= maxRow; row++) { for (int col = 1; col <= maxColumn; col++) { Console.Write(sheet[row, col].Value); Console.Write("\t\t"); } Console.Write("\n"); } Console.ReadKey();For manipulating Excel files, you can visit the following documentation:
https://www.e-iceblue.com/Tutorials/Spire.XLS/Spire.XLS-Program-Guide/Spire.XLS-Program-Guide-Content.html
Yazhini MP128 reputationPosted Dec 15, 2021, 1:57 AM EST
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts