SwiftExcel 1.1.4

dotnet add package SwiftExcel --version 1.1.4
                    
NuGet\Install-Package SwiftExcel -Version 1.1.4
                    
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="SwiftExcel" Version="1.1.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SwiftExcel" Version="1.1.4" />
                    
Directory.Packages.props
<PackageReference Include="SwiftExcel" />
                    
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 SwiftExcel --version 1.1.4
                    
#r "nuget: SwiftExcel, 1.1.4"
                    
#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 SwiftExcel@1.1.4
                    
#: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=SwiftExcel&version=1.1.4
                    
Install as a Cake Addin
#tool nuget:?package=SwiftExcel&version=1.1.4
                    
Install as a Cake Tool

SwiftExcel

Official Site Latest version License MIT

Overview

Lightweight, extremely fast and memory efficient Excel output library for .NET and .NET Core applications. Build your Excel reports in fraction of seconds with no memory footprint thanks to skipping XML serialization and streaming data directly to the file.

Installation

SwiftExcel is available as a NuGet package. You can install it using the NuGet Package Console window:

PM> Install-Package SwiftExcel

Usage

Fill excel document with test data 100 rows x 10 columns

using (var ew = new ExcelWriter("C:\\temp\\test.xlsx"))
{
    for (var row = 1; row <= 100; row++)
    {
        for (var col = 1; col <= 10; col++)
        {
            ew.Write($"row:{row}-col:{col}", col, row);
        }
    }
}

Set custom sheet name and define columns width

var sheet = new Sheet
{
    Name = "Monthly Report", 
    ColumnsWidth = new List<double> { 10, 12, 8, 8, 35 }
};

var ew = new ExcelWriter("C:\\temp\\test.xlsx", sheet);

Using formulas. Output 20 values and calculate average, count, max and sum

using (var ew = new ExcelWriter("C:\\temp\\test.xlsx"))
{
    for (var row = 1; row <= 20; row++)
    {
        ew.Write(row.ToString(), 1, row, DataType.Number);
    }

    ew.WriteFormula(FormulaType.Average, 1, 22, 1, 1, 20);
    ew.WriteFormula(FormulaType.Count, 1, 23, 1, 1, 20);
    ew.WriteFormula(FormulaType.Max, 1, 24, 1, 1, 20);
    ew.WriteFormula(FormulaType.Sum, 1, 25, 1, 1, 20);
}

Performance

SwiftExcel has incredible performance due to ignoring XML serialization and streaming data directly to the file. Below is a performance test creating a document with 100 000 rows and 100 columns compared to other popular Excel output libraries on Nuget.

Execution Time Memory Usage
SwiftExcel 6.1 sec 19 mb
FastExcel 31.1 sec 3200 mb
EPPlus 44.2 sec 2900 mb
Syncfusion.XlsIO 73.3 sec 2700 mb
IronXL.Excel 306.8 sec 7700 mb
Microsoft Interop Excel >3 hours 27 mb

SwiftExcel.Pro

Check out the .Pro version for advanced features like working with multiple sheets or applying custom styles.

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.  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. 
.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 (2)

Showing the top 2 NuGet packages that depend on SwiftExcel:

Package Downloads
SwiftExcel.Contrib

SwiftExcel extensions.

Zeytinbey.SwiftExcelHelper

Zeytinbey.SwiftExcelHelper is an easy-to-use package that streamlines SwiftExcel tasks. Create Excel files effortlessly with handy helper classes and extension methods, making your workflow simpler and more efficient.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.4 202 7/5/2025
1.1.3 66,819 7/10/2023
1.1.2 783 7/7/2023
1.1.0 4,414 7/7/2023
1.0.14 24,489 11/24/2022
1.0.13 5,253 11/11/2022
1.0.12 22,137 6/22/2022
1.0.11 82,994 12/23/2021
1.0.9 164,753 6/12/2021
1.0.8 14,186 12/24/2020
1.0.7 8,769 3/26/2020

Expanded constructor to accept a stream which can be either a regular local FileStream or a stream to a cloud resource like Azure Blob.