also available as:
The tech support is by far the best I have ever worked within 27 years of development. Questions are answered quickly and program fixes are created and are made available.
– Dennis
Read XLS, XLSX, CSV from C# |
Bytescout Spreadsheet SDK is a clean and simple API to read XLS, XLSX, CSV files from C# (C Sharp).
Reading data from XLS and other Excel files is the ability needed in almost every business application. Using Bytescout Spreadsheet SDK is a simple way of reading Excel files using C# even without MS Excel installed.
With the Spreadsheet SDK, you can read XLS, XSLX, CSV, ODS files in C#.
Sample source code – read XLSX in C#:
using System; using System.Collections.Generic; using System.Text; using Bytescout.Spreadsheet; <span data-scayt_word="namespace" data-scaytid="34">namespace</span> <span data-scayt_word="HelloWorld" data-scaytid="35">HelloWorld</span> { class Program { static void Main(string[] <span data-scayt_word="args" data-scaytid="36">args</span>) { // Create new Spreadsheet Spreadsheet document = new Spreadsheet(); document.LoadFromFile("Hello_world.xlsx"); // Get worksheet Worksheet worksheet = document.Workbook.Worksheets.ByName("<span data-scayt_word="Sheet1" data-scaytid="32">Sheet1</span>"); // 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(); } } }
Find all sample source codes for C# and ASP.NET in a free trial of Spreadsheet SDK. Download now!
[socialpug_share]