Read XLS table .NET tutorial - C# sample - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

Read XLS table .NET tutorial – C# sample

  • Home
  • /
  • Articles
  • /
  • Read XLS table .NET tutorial – C# sample

Read from XLS file to table in .NET using C# – this tutorial shows reading Excel files in .NET with Spreadsheet SDK. Use source code sample below to read data from XLS file in CSharp.

C#

 const string inputFile = @"PeriodicTableOfElementsSpreadsheet.xls";

           // Create new spreadsheet to read xls to table in .net
           Spreadsheet spreadsheet = new Spreadsheet();
           spreadsheet.LoadFromFile(inputFile);

           // Read XLS to table using Spreadsheet SDK
           DataTable dt = spreadsheet.ExportToDataTable();

           // Close spreadsheet object
           spreadsheet.Close();

Tutorials:

prev
next