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.


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)

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

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