Read Excel with ASP.NET - C# source code - 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 Excel with ASP.NET – C# source code

  • Home
  • /
  • Articles
  • /
  • Read Excel with ASP.NET – C# source code

Read Excel with ASP.NET tutorial shows how to read data from Excel file in ASP.NET using C# with Bytescout Spreadsheet SDK. Use the source code below to read Excel files.

C#

using System;
using System.Collections.Generic;
using System.Text;
using Bytescout.Spreadsheet;


......
           // Create new Spreadsheet object to read from given excel 
           Spreadsheet document = new Spreadsheet();

           // read excel file (supports xls excel, xlsx excel, csv, ods)
          document.LoadFromFile("Hello_world.xlsx");

           // Get worksheet by name
           Worksheet worksheet = document.Workbook.Worksheets.ByName("Sheet1");

           // Read cell value
           string value = worksheet.Cell(0, 0).ValueAsString;

.....

Tutorials:

prev
next