SpreadsheetLight 3.4.9

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

// Install SpreadsheetLight as a Cake Tool
#tool nuget:?package=SpreadsheetLight&version=3.4.9

SpreadsheetLight is an open source Open XML spreadsheet library for .NET Framework written in C#, and is released under the MIT License. You can create new Open XML spreadsheets, or work with existing Open XML spreadsheets that are compatible with Microsoft Excel 2007/2010/2013 and LibreOffice Calc.

No Office/Excel Interop needed. You do not need Microsoft Office/Excel to be installed.

Dependency: Open XML SDK 2.5

Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (19)

Showing the top 5 NuGet packages that depend on SpreadsheetLight:

Package Downloads
SpreadsheetHelper

.NET Spreadsheet Object Wrapper for SpreadsheetLight

AutomationFramework_NetCore

AT Net Core Automation Framework

TechTools.Utils

Utilitarios con funciones que se utilizan en varios proyectos de desarrollo de software

MagiQL.Framework.Renderers.SpreadsheetGenerator

MagiQL :: MagiQL.Framework.Renderers.SpreadsheetGenerator

FastReport.Data.Excel The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org.

Represents a connection to Excel data. Shared Plugin for all versions of FastReport product: FastReport .NET, FastReport.Core, FastReport.OpenSource, FastReport.WPF. Requirements: Any FastReport 2024.1.8.0+ package, NuGet Client 3.4.4+

GitHub repositories (4)

Showing the top 4 popular GitHub repositories that depend on SpreadsheetLight:

Repository Stars
FastReports/FastReport
Free Open Source Reporting tool for .NET6/.NET Core/.NET Framework that helps your application generate document-like reports
Kinovea/Kinovea
Video solution for sport analysis. Capture, inspect, compare, annotate and measure technical performances.
trimble-oss/dba-dash
DBA Dash - SQL Server Monitoring Tool
Tadelsucht/BulkPDF
BulkPDF is a free and easy to use open source software, which allows to automatically fill an existing PDF form with differen values. Only a spreadsheet (Microsoft Excel 2007/2010/2013, LibreOffice or OpenOffice Calc) with the desired values is required.
Version Downloads Last updated
3.5.0 1,020,048 11/14/2020
3.4.11 305,987 7/14/2019
3.4.10 6,499 7/5/2019
3.4.9 466,207 4/1/2017
3.4.8 73,069 10/21/2016
3.4.7 4,413 10/9/2016
3.4.6 20,398 10/3/2016
3.4.5.1 5,517 9/26/2016
3.4.5 3,554 9/26/2016
3.4.4 320,160 4/26/2014
3.4.3 5,058 3/1/2014
3.4.2 2,095 2/22/2014
3.4.1 23,228 8/31/2013
3.4.0 24,295 7/27/2013
3.3.1 4,135 6/7/2013
3.3.0 6,389 5/18/2013
3.2.9 2,978 5/12/2013
1.0.0 4,698 4/24/2013

You can read the full list of changes at http://spreadsheetlight.com/version-history/ Note that source code is only available up to minor releases, meaning Major.Minor.0 versions.

Version 3.4.9
- Get filter range of a worksheet if a filter exists. See SLDocument.GetFilterRange().
- On the Mono Framework, the error "System.OverflowException : Arithmetic operation resulted in an overflow." no longer occurs. This was due to the System.Drawing.Bitmap not setting a default resolution (within Mono Framework. Running on .NET is fine. This part happens during the initialisation phase for setting the internal SLSimpleTheme class). Mono uses libgdiplus, which apparently assigns the Bitmap object zero for both horizontal and vertical resolutions. Hence the overflow error.
- Bug fix: It was not possible to copy a cell style from a cell to another cell that's on the same row or column. It is now fixed (it was De Morgan's laws incorrectly implemented).
- Bug fix: Creating a data validation that references another worksheet as a data source now works correctly.
- Bug fix: Calling InsertRow() multiple times now work.
- Bug fix: If a formula is passed as a parameter to HighlightCellsEqual() in SLConditionalFormatting class, it presents incorrect behaviour (something like $B$1 becomes "$B$1", with incorrectly double quoting). It is now fixed (along HighlightCellsBeginningWith(), HighlightCellsBetween(), HighlightCellsContainingText(), HighlightCellsEndingWith(), HighlightCellsGreaterThan(), HighLightCellsLessThan())
- Bug fix: Copying a worksheet now returns true if successful.

Versions 3.4.8
- You can now check with SLDocument.HasCellError(). WARNING: SpreadsheetLight does not have a formula calculation engine, so only existing errors are reported.
- Bug fix: SLStyle.Alignment.TextRotation now rotates text correctly.
- Bug fix: Worksheet names are now (more? [Is that grammatically correct?]) correctly surrounded with single quotes in formulas and chart sheet formulas if they contain special characters (every special character on your keyboard except underscore and period).
- Bug fix: GetCellValueAsString() now no longer contain the phonetic text (if it exists). As part of the correction, SLRstType.ToPlainString() also no longer contain the phonetic text.
- Bug fix: Inline strings in existing Excel files will now be correctly loaded (and saved into the shared strings table if the particular worksheet with the inline strings is selected).

Thanks to these awesome people for sending feature and bug requests: Bodo F, JF, HK, Vincent D, Jerry S

Version 3.4.7
- Bug fix: Selecting worksheets one after another that has row properties (such as custom row heights) will no longer cause an error. (The error is actually in WriteSelectedWorksheet(), where the iteration was over a combined list of row properties indices and cell row indices, and the error occurs if there's a row properties row without any cells.)

Thanks to David L for telling me about the bug.

Version 3.4.6
- Shared string unique count is now written in the file. This makes opening the resulting Excel file faster if there are large number of text strings. Set the property SLDocument.WriteUniqueSharedStringCount to false if the file opens with an error.
- Bug fix: Copy rows/columns now does not cause a runtime error (there were 2 separate cell stores and the wrong one was used, hence the reference index not found).

Version 3.4.5
- SmartTags is now removed from consideration (not so smart now, are you? ;). Which means the code is now ready for Open XML SDK 2.5! And yes, it now works with Open XML SDK 2.5 (have I mentioned that? lol)
- Internal cell storage structure is revamped. It used to be a 1-dimensional dictionary with a 2-dimensional key, but is now a 2-dimensional dictionary with a 1-dimensional key. Tech explanation: Dictionary<SLCellPoint, SLCell> to Dictionary<int, Dictionary<int, SLCell>>. This is done because a 1-dimensional key is at most 2^31 hash entries, which cannot contain the theoretical 1048576 (2^20) rows and 16384 (2^14) columns per worksheet supported by latest versions of Excel.
- Bug fix: plotting separate data series on charts as different chart types now works (your typical combination chart such as a column chart with lines)
- Breaking change: SLDocument.GetCells() now returns a Dictionary<int, Dictionary<int, SLCell>>

Version 3.4.4
- Bug fix: Formulas will be correctly changed when columns are deleted (when the formula involves said deleted columns).

Version 3.4.3
- Bug fix: Cell value/formula set on a shared cell formula base cell now works correctly. For example, setting on C3 when C3 holds a shared cell formula will work.
- Bug fix: Setting filter on worksheet now works correctly. It failed to sort before (basically also need to set underlying defined name _xlnm._FilterDatabase. Gawdiggitty.)

Version 3.4.2
- You can now get row/column grouping levels. See GetRowGroupLevel() and GetColumnGroupLevel() functions.
- You can now get a list of the shared cell formulas in the currently selected worksheet. See GetSharedCellFormulas() function.
- Cell formulas are now more correctly maintained when copying/inserting/deleting cells/rows/columns.
- Catered for situation where cell reference ranges aren't in top-left to bottom-right format (such as E1:A7). See SLTool for translating reference sequences to SLCellPointRange and vice versa. Don't worry, you probably wouldn't have known about this anyway...
- You can now draw borders on a cell range! And border grids! Try out the DrawBorder() and DrawBorderGrid() functions.
- You can now merge cells and set style/border properties at the same time! No more manual border drawing on merged cells! Woohoo! See MergeWorksheetCells() function overloads.
- You can now make SpreadsheetLight throw up, I mean, throw exceptions! When there are exceptions, of course. See ThrowExceptionsIfAny property. Not sure how much help this is though...
- You can now forcibly get a boolean value if it looks like it's a boolean but actually stored as text. See the GetCellValueAsBoolean() functions.
- Breaking change: SLCellFormula.Reference data type changed from string to List<SLCellPointRange> (but you shouldn't have been using this anyway...)
- Bug fix: The properties "count" and "uniqueCount" removed from shared strings table part. It seems a high number of shared strings will cause the calculation to render a corrupt file. See when writing the shared strings table for details.
- Bug fix: Outline (grouping) levels of rows and columns now limited to 0 to 7 (was allowed to go to 8 previously. See GroupRows() and GroupColumns() in RowColumnFunctions.cs)

Version 3.4.1
- Removed optional argument use (specifically IsStylish) so that developers using Visual Studio 2008 (.NET Framework 3.5) can still compile the source code.
- Optimised GetWorksheetStatistics(). It's now faster and less memory intensive.
- Bug fix: autofitting rows with a smaller initial height now correctly autofit to content
- Bug fix (?): SLStyle.MergeStyle() now takes on the new style object's format code regardless.