Skip to content

Exceleration is a C# library that wraps ExcelDataReader. It helps you better interact with Excel files by simplifying the development experience.

License

Notifications You must be signed in to change notification settings

WilliamSmithEdward/Exceleration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exceleration

Exceleration is a C# library that wraps ExcelDataReader. It helps you better interact with Excel files by simplifying the development experience.

Example

Basic Usage

using Exceleration;

var wb = new Workbook(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "test.xlsx"));

var ws = wb["Sheet1"];

var cell = ws["A1"];

Console.WriteLine(cell.Address + ": " + cell.Value);

cell = cell.Offset(1, 0);

Console.WriteLine(cell.Address + ": " + cell.Value);

cell = cell.Offset(0, 1);

Console.WriteLine(cell.Address + ": " + cell.Value);

Get All Cells

using Exceleration;

var wb = new Workbook(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "test.xlsx"));

var ws = wb["Sheet1"];

var cells = ws.Cells;

Console.WriteLine(cells.First().Address + ": " + cells.First().Value);

Using LINQ to Filter Cells

using Exceleration;

var wb = new Workbook(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "test.xlsx"));

var ws = wb["Sheet1"];

var cells = ws.Cells.Where(x => x.ColLetter.Equals("A"));

foreach (var item in cells)
{
    Console.WriteLine(item.Address + ": " + item.Value + " " + item.ColLetter);
}

Accessing Rows and Columns Collections

using Exceleration;

var wb = new Workbook(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "test.xlsx"));

var ws = wb["Sheet1"];

var columns = ws.Columns("A");

var rows = ws.Rows(1);

Console.WriteLine(string.Join(",", columns.Select(x => x.Value)));

Console.WriteLine(string.Join(",", rows.Select(x => x.Value)));

Attributions

NuGet icon "SQLServerInteraction.png" designed by Stockes Design on Freepik.com

About

Exceleration is a C# library that wraps ExcelDataReader. It helps you better interact with Excel files by simplifying the development experience.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages