Skip to content

Excel .Net is a standalone C# assembly which gives you full set of API to manipulate (read, write, edit, convert) with documents in XLSX, XLS, XLSB, CSV and others formats.

Notifications You must be signed in to change notification settings

SautinSoft/SautinSoft.Excel.Examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SautinSoft.Excel

Nuget Nuget Passed windows macOS linux docker aws microsoftazure

Excel .Net is a standalone C# assembly which gives you full set of API to manipulate (read, write, edit, convert) with documents in XLSX, XLS, XLSB, CSV and others formats.

Excel

SautinSoft.Excel is a standalone C# assembly which gives you full set of API to manipulate (read, write, edit, convert) with documents in XLSX, XLS, XLSB, CSV and others formats.

Quick links

Top Features

System Requirement

  • .NET Framework 4.6.1 - 4.8.1
  • .NET 5, 6, 7, 8, 9
  • Windows, Linux, macOS, Android, iOS.

Getting Started with Excel .Net

Are you ready to give Excel .NET a try? Simply execute Install-Package sautinsoft.excel from Package Manager Console in Visual Studio to fetch the NuGet package. If you already have Excel .NET and want to upgrade the version, please execute Update-Package sautinsoft.excel to get the latest version.

Convert XLSX/XLS to PDF

string inpFile = @"..\..\..\Example.xlsx";
string inpFile = @"..\..\..\Example.xls";
string outFile = @"..\..\..\Result.pdf";
ExcelDocument excelDocument = ExcelDocument.Load(inpFile);
excelDocument.Save(outFile, new PdfSaveOptions());

Create Excel document

ExcelDocument excelDocument = new ExcelDocument();
excelDocument.Worksheets.Add("The main worksheet");
excelDocument.Worksheets.Add("Second worksheet");

// Create a variable to address
var worksheet = excelDocument.Worksheets["The main worksheet"];

// Add plain text
worksheet.Cells["A1"].Value = "This is common string";
worksheet.Cells["B1"].Value = "Hello, World! 12345";

// Add the result of  the expression
worksheet.Cells["A2"].Value = "This is the result of a mathematical expression in C#";
worksheet.Cells["B2"].Value = 5 + 5;

excelDocument.Save(outFile, new XlsxSaveOptions());

Load Excel file

string filePath = @"..\..\..\example.xlsx";
// The file format is detected automatically from the file extension: ".xlsx".
ExcelDocument excel = ExcelDocument.Load(filePath);
    if (excel != null)
Console.WriteLine("Loaded successfully!");

Modify XLSX/XLS documents

string image = @"..\..\..\cup.jpg";
string outFile = @"..\..\..\Result.xlsx";

ExcelDocument excelDocument = new ExcelDocument();
excelDocument.Worksheets.Add("Page 1");
var worksheet = excelDocument.Worksheets["Page 1"];

// Insert an image
worksheet.Pictures.Add(image, SKRect.Create(1080, 960));

excelDocument.Save(outFile);

Resources

About

Excel .Net is a standalone C# assembly which gives you full set of API to manipulate (read, write, edit, convert) with documents in XLSX, XLS, XLSB, CSV and others formats.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •