Technical Support Question: How can I Read Excel files with ASP.NET?

  • Home
  • /
  • Blog
  • /
  • Technical Support Question: How can I Read Excel files with ASP.NET?
Try Free SQL Trainer - learn by doing!
SQL queries made easy - Natural Questions to SQL Converter.

We like any questions from our users, here is one of the most interesting cases (the ByteScout Spreadsheet SDK software).

I’m using the spreadsheet SDK and can’t figure out how to read excel with asp.net.

Great question, here’s the source code for 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;
We’re waiting for your new questions!
prev
next