How to read cells from XLSX (Excel 2007 spreadsheet) document using Bytescout Spreadsheet for .NET - 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!

How to read cells from XLSX (Excel 2007 spreadsheet) document using Bytescout Spreadsheet for .NET

  • Home
  • /
  • Articles
  • /
  • How to read cells from XLSX (Excel 2007 spreadsheet) document using Bytescout Spreadsheet for .NET

How to read data from XSLX document (MS Office 2007 spreadsheet) using Bytescout Spreadsheet SDK for .NET

This source code sample demonstrates how to read cells from existing .XLSX Excel 2007 spreadsheet file using Bytescout Spreadsheet lib for .NET

Source Excel 2007 XLSX document screenshot:

Source XLSX Excel 2007 document

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

namespace HelloWorld
{
class Program
{
static void Main(string[] args)
{
// Create new Spreadsheet
Spreadsheet document = new Spreadsheet();

// load from file
document.LoadFromFile(“
Hello_world.xlsx”);

// Get worksheet
Worksheet worksheet = document.Workbook.Worksheets.ByName(“Sheet1”);

// Read cell value
Console.WriteLine(“Cell (0,0) value: {0}”, worksheet.Cell(0, 0).ValueAsString);

// Write message
Console.Write(“Press any key to continue…”);

// Wait user input
Console.ReadKey();
}
}
}

Download example source code: bytescoutxls_read_xslx_excel2007.zip (8 KB)

Tutorials:

prev
next