OpenExcelSdk 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package OpenExcelSdk --version 0.1.0
                    
NuGet\Install-Package OpenExcelSdk -Version 0.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="OpenExcelSdk" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OpenExcelSdk" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="OpenExcelSdk" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add OpenExcelSdk --version 0.1.0
                    
#r "nuget: OpenExcelSdk, 0.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package OpenExcelSdk@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=OpenExcelSdk&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=OpenExcelSdk&version=0.1.0
                    
Install as a Cake Tool

What is OpenExcelSdk ?

OpenExcelSdk is a open-source backend .NET library to use Excel (xlsx) very easily.

It's written in C#/NET8.

The only dependency is OpenXML SDK, the official Microsoft library to work with Excel files.

This Microsoft library is not easy to use, so OpenExcelSdk propose a simple way to use Excel rows and cells values.

A quick example

Read B2 string cell value

The code below open an excel file, get the first sheet, then get the B2 cell. After that, if the type of the cell is string, get the string cell value and display it.

bool res;
ExcelError error;
ExcelCellValueMulti cellValueMulti;

// create the excel processor to read/create/update cell
ExcelProcessor proc = new ExcelProcessor();

// open an excel file
string filename = @".\Files\data.xlsx";
res = proc.Open(filename, out ExcelFile excelFile, out error);

// get the first sheet of the excel file
proc.GetFirstSheet(excelFile, out ExcelSheet excelSheet, out error);

// get cell at B7 (A is 1, B is 2)
proc.GetCellAt(excelSheet, 2, 7, out ExcelCell cell, out error);

// get the type and the value of cell
proc.GetCellTypeAndValue(excelSheet, cell, out cellValueMulti, out error);

//> type of the cell can be: string, int, double, DateTime, DateOnly, TimeOnly.

// if the cell type is string, get the value and display it
if(cellValueMulti.CellType == ExcelCellType.String)
{
  Console.WriteLine("B7 type: string, value:" + proc.GetCellValueAsString(excelFile, cell));
} 

Others functions

Get row/last row index

The code below get a the last row index, and also get a row at an index.

ExcelError error;
bool res;
ExcelProcessor proc = new ExcelProcessor();

string filename = @".\Files\data.xlsx";
proc.Open(filename, out ExcelFile excelFile, out error);
proc.GetSheetAt(excelFile, 0, out ExcelSheet excelSheet, out error);

int lastRowIdx = proc.GetLastRowIndex(excelSheet);
Console.WriteLine("last row idx: " + lastRowIdx);

// get row at index 0, the first one
res = proc.GetRowAt(excelSheet, 0, out ExcelRow row, out error);
if (!res)
	Console.WriteLine("ERROR, unbale to read the row");

Create an excel file

The code create an excel file with one sheet.

bool res;
ExcelError error;
ExcelProcessor proc = new ExcelProcessor();

string filename = @".\Files\data.xlsx";
res=proc.CreateExcelFile(filename, out ExcelFile excelFile, out error);
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on OpenExcelSdk:

Package Downloads
Lexerow

Lexerow is a backend dotnet library to process very easily datarows and cells in Excel files. You can for example detect empty cell in a column and set a specific value.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.6.0 44 3/14/2026
0.5.0 60 1/24/2026
0.4.0 77 12/30/2025
0.3.0 66 12/28/2025
0.2.0 146 12/24/2025
0.1.0 85 12/20/2025