Excel.Labs 3.0.3

dotnet add package Excel.Labs --version 3.0.3                
NuGet\Install-Package Excel.Labs -Version 3.0.3                
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="Excel.Labs" Version="3.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Excel.Labs --version 3.0.3                
#r "nuget: Excel.Labs, 3.0.3"                
#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.
// Install Excel.Labs as a Cake Addin
#addin nuget:?package=Excel.Labs&version=3.0.3

// Install Excel.Labs as a Cake Tool
#tool nuget:?package=Excel.Labs&version=3.0.3                

Welcome to Excel Labs

ExcelLabs is an Excel Helper library written in C#. Create Excel files Simple and Fast.

Features

This tool provides a C# based solution to create Excel files without complex queries. This package supports Android, iOS, Linux, macOS and Windows.

Installation

NuGet Package Manager
PM> Install-Package Excel.Labs
.NET CLI
> dotnet add package Excel.Labs
Release Notes - v3.0.3
  • Fixed issue where temp files were shareable and not deleted on close
  • SaveFileWithCleanXmlText, CleanTextForXml and ColumnIndexToColumnLetter functions added

Definition

Model
public class Cellx
{
   public int RowIndex { get; set; }
   public string ColumnName { get; set; }
   public string Value { get; set; }
}
Usage
1. Create a Cell List
2. Add Some Data
3. Call SaveFile Function

Optionals with June 2024 v3.0.3 Update
4. Call XML-safe SaveFileWithCleanXmlText Function
5. Call CleanTextForXml to clean not-allowed XML characters
6. Call ColumnIndexToColumnLetter to Convert integer to Excel Column Letter like 1 to A
string title = "Excel Labs NuGet";
string sheetName = "Simple and Fast";
string path = AppDomain.CurrentDomain.BaseDirectory;

// 1. create a cell list
List<Cellx> cells = new List<Cellx>();

// 2. values as an array
List<string> languages = new List<string>() {
    "Java", // A
    "C#", // B
    "Javascript", // C
    "Swift", // D
    "Php", // E
    "Python", // F
    "Go", // G
    "Swift", // H
    "", // I
    "", // J
    "", // K
    "Objective-C", // L
    "C++", // M
    "F#", // N
    "2024 June" // O
};
    
foreach (string lang in languages)
{
    // no column name for ordered columns
    cells.Add(new Cellx(1, lang));
}

// 3. single value with column name
cells.Add(new Cellx(2, "Fortran", "A"));
cells.Add(new Cellx(2, "Cobol", "D"));
cells.Add(new Cellx(2, "Pascal", "I"));

// 4. single value without column name
cells.Add(new Cellx(3, "Visual Studio"));
cells.Add(new Cellx(3, "Webstorm"));
cells.Add(new Cellx(3, "Xcode"));
cells.Add(new Cellx(3, "Notepad"));

// call save function
ExcelLabs.SaveFile(title, path, sheetName, cells);

// call safe save function
ExcelLabs.SaveFileWithCleanXmlText(title, path, sheetName, cells);

// clean not-allowed XML characters
string safeToWriteText = ExcelLabs.CleanTextForXml(title + " safe");
Console.WriteLine("Safe text: " + safeToWriteText);

// convert integer to Excel Column Letter like 1 to A
string excelColumnLetter1 = ExcelLabs.ColumnIndexToColumnLetter(1);
Console.WriteLine("1 to column letter: " + excelColumnLetter1); // A

// convert integer to Excel Column Letter like 1 to G
string excelColumnLetter7 = ExcelLabs.ColumnIndexToColumnLetter(7);
Console.WriteLine("7 to column letter: " + excelColumnLetter7); // G
Screenshot

Image

Support or Contact

Please visit https://github.com/doxa-labs/ExcelLabs or http://doxalabs.co.uk

License

Excel Labs is released under the MIT license.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.3 754 6/11/2024
2.2.1 2,022 3/28/2023
2.2.0 3,258 11/30/2021
2.1.0 18,083 2/22/2021
2.0.0 799 9/20/2019
1.1.0 531 9/19/2019

.NET 7 & .NET Framework Demo