LargeXlsx 0.0.3

There is a newer version of this package available.
See the version list below for details.
dotnet add package LargeXlsx --version 0.0.3                
NuGet\Install-Package LargeXlsx -Version 0.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="LargeXlsx" Version="0.0.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LargeXlsx --version 0.0.3                
#r "nuget: LargeXlsx, 0.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 LargeXlsx as a Cake Addin
#addin nuget:?package=LargeXlsx&version=0.0.3

// Install LargeXlsx as a Cake Tool
#tool nuget:?package=LargeXlsx&version=0.0.3                

LargeXlsx - Minimalistic .net library to write large XLSX files

This is a minimalistic library, written in C# targeting .net standard 2.0, providing a tiny layer above Microsoft's Office Open XML library to facilitate creation of very large Excel files in XLSX format.

This library provides simple primitives to write data in a streamed manner, so that potentially huge files can be created while consuming a low, constant amount of memory.

Supported features

Currently the library supports:

  • cells containing inline strings
  • cells containing numeric (double) values
  • multiple sheets
  • merged cells (warning: their reference is kept in memory until a sheet is complete)
  • split panes, a.k.a. frozen rows and columns
  • basic styling: font face, size, and color; solid background color; top-right-bottom-left cell borders; numeric formatting

Example

To create a simple single-sheet Excel document:

using (var stream = new FileStream("Simple.xlsx", FileMode.Create))
using (var largeXlsxWriter = new LargeXlsxWriter(stream))
{
    var whiteFont = largeXlsxWriter.Stylesheet.CreateFont("Calibri", 11, "ffffff", bold: true);
    var blueFill = largeXlsxWriter.Stylesheet.CreateSolidFill("004586");
    var headerStyle = largeXlsxWriter.Stylesheet.CreateStyle(whiteFont, blueFill, LargeXlsxStylesheet.GeneralNumberFormat, LargeXlsxStylesheet.NoBorder);

    largeXlsxWriter.BeginSheet("Sheet1")
        .BeginRow().WriteInlineString("Col1", headerStyle).WriteInlineString("Col2", headerStyle).WriteInlineString("Col3", headerStyle)
        .BeginRow().WriteInlineString("Row2").Write(42).Write(-1)
        .BeginRow().WriteInlineString("Row3").SkipColumns(1).Write(1234)
        .SkipRows(2)
        .BeginRow().WriteInlineString("Row6").AddMergedCell(1, 2).SkipColumns(1).Write(3.14159265359);
}

The output is like:

Single sheet Excel document with 6 rows and 3 columns

Known issues

On .net core there is an issue on System.IO.Packaging (used by the Open XML SDK to write XLSX's zip packages) that causes memory consumption to be proportional to the amount of data written, instead of being low and constant. Unfortunately, this kind of defeats the purpose of this library when targeting .net core. The issue is not present on .net framework.

License

Permissive, 2-clause BSD style

LargeXlsx - Minimalistic .net library to write large XLSX files

Copyright 2020 Salvatore ISAJA

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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 (1)

Showing the top 1 popular GitHub repositories that depend on LargeXlsx:

Repository Stars
DaxStudio/DaxStudio
DAX Studio is a tool to write, execute, and analyze DAX queries in Power BI Desktop, Power Pivot for Excel, and Analysis Services Tabular.
Version Downloads Last updated
1.11.0 54 12/26/2024
1.10.0 37,260 7/28/2024
1.9.2 8,221 6/29/2024
1.9.1 85,592 1/28/2024
1.9.0 11,555 12/8/2023
1.8.0 73,589 6/21/2023
1.7.4 22,601 4/7/2023
1.7.3 1,140 3/12/2023
1.7.2 2,789 3/4/2023
1.7.1 17,810 2/26/2023
1.7.0 7,224 2/19/2023
1.6.3 42,853 9/17/2022
1.6.2 6,413 9/5/2022
1.6.1 670 8/20/2022
1.6.0 4,071 7/23/2022
1.5.1 3,311 7/11/2022
1.5.0 37,618 1/31/2022
1.4.0 1,600 1/24/2022
1.3.1 3,325 11/28/2021
1.3.0 21,638 6/24/2021
1.2.0 12,456 3/16/2021
1.1.1 4,248 9/30/2020
1.1.0 1,351 7/6/2020
1.0.0 580 5/31/2020
1.0.0-rc.1 301 5/20/2020
0.9.0 531 5/11/2020
0.0.10 581 4/10/2020
0.0.9 535 3/7/2020
0.0.8 566 2/22/2020
0.0.7 599 2/16/2020
0.0.6 861 2/14/2020
0.0.3 484 2/4/2020
0.0.2 495 2/3/2020
0.0.1 724 1/29/2020