CompuMaster.Excel.ExcelOps 2025.12.24

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

CompuMaster.Excel.ExcelOps

A common API for several libraries to access and edit Excel files

Why this project?

  • Provides the common API for all following Excel engines
  • Sometimes there is the need to switch the Excel engine under the hood, because the standard MS Excel engine (via COM interop) is too slow for many operations.
  • Depending on your custom project or developer license, you might want/require to use a specific alternative Excel engine
  • Allow parallel use of several Excel engines in your project
    • at least for some work items, you need Excel engine A, while for some other work item you need Excel engine B because of its feature set, bugs, etc.
    • allow step-by-step-migrations instead of one big migration task

One common API for several Excel engines

  • CompuMaster.Excel.MicrosoftExcel
    • Use Microsoft.Office.Interop.Excel v15 (MS Office 2013) or higher, for solutions targetting .NET Framework 4.8 or .NET 6 or higher
  • CompuMaster.Excel.EpplusFreeFixCalcsEdition
    • Use Epplus 4.5 with LGPL license for solutions targetting .NET Framework 4.8 or .NET 6 or higher
  • CompuMaster.Excel.EpplusPolyformEdition
    • Use latest Epplus with Epplus Software's polyform license for solutions targetting .NET Framework 4.8 or .NET 6 or higher
  • CompuMaster.Excel.FreeSpireXls
    • Use FreeSpire.Xls for solutions targetting .NET Framework 4.8 or .NET 6 or higher

Quick & dirty engine comparison / why you shouldn't use MS Excel for all situations

In following a simplified comparison without any warranties. Subjects might change over time, too. Please contact the responsible manufacturerer especially for licensing issues.

Engine Pros Cons Note on licensing or support Manufacturer website
Microsoft Excel + 100% compatibility to Micrsoft Excel 😉 - Speed<br/>- Dependency to windows platform only (and maybe MacOS) * licensing per user (!)<br/>* NOT recommended/supported for software deployment, for servers or for similar automation <sup>1)</sup> www.microsoft.com
Epplus 5 or higher + Speed - no export of chart images<br/>- calculation issue when re-opening in MS Excel <sup>2)</sup><br/>- limited VBA/macro support * Polyform license<br/>* limited community licensing<br/>* commercial licensing available www.epplussoftware.com
Epplus 4 + Speed - no export of chart images<br/>- some (seldom-used) calculation functions not implemented<br/>- calculation issue when re-opening in MS Excel <sup>2)</sup>, but workaround AVAILABLE (in this project's fork)<br/>- limited VBA/macro support * LGPL<br/>* "free license"<br/>* no manufacturer support (end of life) www.github.com/JanKallman/EPPlus
Spire.Xls + Speed<br/>+ Charts export (windows platform only) - calculation issue when re-opening in MS Excel <sup>2)</sup><br/>- limited VBA/macro support * commercial licensing available www.e-iceblue.com
FreeSpire.Xls + Speed<br/>+ Charts export (windows platform only) - Limitations by manufacturer due to free edition<br/>- calculation issue when re-opening in MS Excel <sup>2)</sup><br/>- limited VBA/macro support * "free license"<br/>* no official support by manufacturer www.e-iceblue.com

PLEASE NOTE:

<sup>1)</sup> A great article on Microsoft Excel for automation, inclusing licensing issues, is available at https://support.microsoft.com/en-us/topic/considerations-for-server-side-automation-of-office-48bcfe93-8a89-47f1-0bce-017433ad79e2

<sup>2)</sup> calculation issue when re-opening in MS Excel: after Excel file has been written to disk, cell formulas are usually calculated and their results are buffered in the saved Excel file. In certain cases, MS Excel is not able to refresh calculated cell values when they depend (indirectly) on other cells which have changed.

  • This issue applies for all 3rd-party engines (as far as I know)
  • Available workaround in MS Excel: enter each single cell manually (and in correct dependency order!) and confirm its formula (and sorry, F9 for full automatic recalculation doesn't work)
  • Available workaorund in Epplus 4 special edition (provided within this project, see CompuMaster.Excel.EpplusFreeFixCalcsEdition): Clear all cached values from cells with formulas to enforce MS Excel to recalculate them (without depending of any caches)

Licensing

  • Please see license file in project directory
  • Pay attention to required licensing of the 3rd party components (commercial vs. community licensing, user licensing, etc.)

Examples

Epplus 4 (LGPL)

<details> <summary>Quick-Start: Create a workbook and put some values and formulas, then output the result to console</summary>

using CompuMaster.Excel.ExcelOps;

string FirstSheetName;
TextTable formulasOrValues;
TextTable values;

//Create a workbook and put some values and formulas
ExcelDataOperationsBase workbook = new EpplusFreeExcelDataOperations(null, ExcelDataOperationsBase.OpenMode.CreateFile, new ExcelDataOperationsOptions());
FirstSheetName = workbook.SheetNames()[0];
workbook.WriteCellValue<int>(FirstSheetName, 0, 0, 123);
workbook.WriteCellValue<double>(new ExcelCell(FirstSheetName, "B1", ExcelCell.ValueTypes.All), 456.123);
workbook.WriteCellFormula(FirstSheetName, 0, 2, @"SUM(A1:B1)", true);

//Output table with formulas or alternatively with formatted cell value
formulasOrValues = workbook.SheetContentMatrix(FirstSheetName, ExcelDataOperationsBase.MatrixContent.FormulaOrFormattedText);
System.Console.WriteLine(formulasOrValues.ToUIExcelTable());

//Output table with calculated or static values
values = workbook.SheetContentMatrix(FirstSheetName, ExcelDataOperationsBase.MatrixContent.StaticOrCalculatedValues);
System.Console.WriteLine(values.ToUIExcelTable());

leads to following output

# |A  |B      |C
--+---+-------+-----------
1 |123|456,123|=SUM(A1:B1)

# |A  |B      |C
--+---+-------+-------
1 |123|456,123|579,123

</details>

Epplus (Polyform license edition)

<details> <summary>Quick-Start: Create a workbook and put some values and formulas, then output the result to console</summary>

using CompuMaster.Excel.ExcelOps;

string FirstSheetName;
TextTable formulasOrValues;
TextTable values;

//Assign required license context for Epplus component
EpplusPolyformExcelDataOperations.LicenseContext = new EpplusPolyformExcelDataOperations.EpplusLicenseActivator(OfficeOpenXml.EPPlusLicenseType.NonCommercialPersonal, "Your Name");

//Create a workbook and put some values and formulas
workbook = new EpplusPolyformExcelDataOperations(null, ExcelDataOperationsBase.OpenMode.CreateFile, new ExcelDataOperationsOptions());
FirstSheetName = workbook.SheetNames()[0];
workbook.WriteCellValue<int>(FirstSheetName, 0, 0, 123);
workbook.WriteCellValue<double>(new ExcelCell(FirstSheetName, "B1", ExcelCell.ValueTypes.All), 456.123);
workbook.WriteCellFormula(FirstSheetName, 0, 2, @"SUM(A1:B1)", true);

//Output table with formulas or alternatively with formatted cell value
formulasOrValues = workbook.SheetContentMatrix(FirstSheetName, ExcelDataOperationsBase.MatrixContent.FormulaOrFormattedText);
System.Console.WriteLine(formulasOrValues.ToUIExcelTable());

//Output table with calculated or static values
values = workbook.SheetContentMatrix(FirstSheetName, ExcelDataOperationsBase.MatrixContent.StaticOrCalculatedValues);
System.Console.WriteLine(values.ToUIExcelTable());

leads to following output

# |A  |B      |C
--+---+-------+-----------
1 |123|456,123|=SUM(A1:B1)

# |A  |B      |C
--+---+-------+-------
1 |123|456,123|579,123

</details>

FreeSpire.Xls

<details> <summary>Quick-Start: Create a workbook and put some values and formulas, then output the result to console</summary>

using CompuMaster.Excel.ExcelOps;

string FirstSheetName;
TextTable formulasOrValues;
TextTable values;

//Create a workbook and put some values and formulas
workbook = new FreeSpireXlsDataOperations(null, ExcelDataOperationsBase.OpenMode.CreateFile, new ExcelDataOperationsOptions());
FirstSheetName = workbook.SheetNames()[0];
workbook.WriteCellValue<int>(FirstSheetName, 0, 0, 123);
workbook.WriteCellValue<double>(new ExcelCell(FirstSheetName, "B1", ExcelCell.ValueTypes.All), 456.123);
workbook.WriteCellFormula(FirstSheetName, 0, 2, @"SUM(A1:B1)", true);

//Output table with formulas or alternatively with formatted cell value
formulasOrValues = workbook.SheetContentMatrix(FirstSheetName, ExcelDataOperationsBase.MatrixContent.FormulaOrFormattedText);
System.Console.WriteLine(formulasOrValues.ToUIExcelTable());

//Output table with calculated or static values
values = workbook.SheetContentMatrix(FirstSheetName, ExcelDataOperationsBase.MatrixContent.StaticOrCalculatedValues);
System.Console.WriteLine(values.ToUIExcelTable());

leads to following output

# |A  |B      |C
--+---+-------+-----------
1 |123|456,123|=SUM(A1:B1)

# |A  |B      |C
--+---+-------+-------
1 |123|456,123|579,123

</details>

Microsoft Excel (via COM interop)

<details> <summary>Quick-Start: Create a workbook and put some values and formulas, then output the result to console</summary>

using CompuMaster.Excel.ExcelOps;

string FirstSheetName;
TextTable formulasOrValues;
TextTable values;

//Create a workbook and put some values and formulas
workbook = new MsExcelDataOperations(null, ExcelDataOperationsBase.OpenMode.CreateFile, new ExcelDataOperationsOptions());
FirstSheetName = workbook.SheetNames()[0];
workbook.WriteCellValue<int>(FirstSheetName, 0, 0, 123);
workbook.WriteCellValue<double>(new ExcelCell(FirstSheetName, "B1", ExcelCell.ValueTypes.All), 456.123);
workbook.WriteCellFormula(FirstSheetName, 0, 2, @"SUM(A1:B1)", true);

//Output table with formulas or alternatively with formatted cell value
formulasOrValues = workbook.SheetContentMatrix(FirstSheetName, ExcelDataOperationsBase.MatrixContent.FormulaOrFormattedText);
System.Console.WriteLine(formulasOrValues.ToUIExcelTable());

//Output table with calculated or static values
values = workbook.SheetContentMatrix(FirstSheetName, ExcelDataOperationsBase.MatrixContent.StaticOrCalculatedValues);
System.Console.WriteLine(values.ToUIExcelTable());

leads to following output

# |A  |B      |C
--+---+-------+-----------
1 |123|456,123|=SUM(A1:B1)

# |A  |B      |C
--+---+-------+-------
1 |123|456,123|579,123

</details>

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  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 Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (5)

Showing the top 5 NuGet packages that depend on CompuMaster.Excel.ExcelOps:

Package Downloads
CompuMaster.Excel.EpplusFreeFixCalcsEdition

Package Description

CompuMaster.Excel.MicrosoftExcel

Based on Microsoft.Office.Interop.Excel v15, for proper Microsoft Excel licensing, please contact Microsoft

CompuMaster.Excel.EpplusPolyformEdition

Package Description

CompuMaster.Excel.FreeSpireXls

Just as a reminder for usage of FreeSpire.Xls: the manufacturer has limited the feature set for this component. Free version is limited to 5 sheets per workbook and 150 rows per sheet.

CompuMaster.Excel.SpireXls

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2025.12.24 66 12/24/2025
2025.12.22.1 212 12/22/2025
2025.12.22 216 12/22/2025
2025.12.18 399 12/18/2025
2025.12.14 287 12/14/2025
2025.12.12 245 12/12/2025
2025.8.19.1 344 8/19/2025
2025.8.19 301 8/19/2025
2025.8.15 263 8/15/2025
2024.12.4.100 412 12/4/2024
2023.11.22.1 778 11/22/2023
2023.11.22 362 11/22/2023
2023.7.26 505 7/26/2023
2023.6.5 549 6/5/2023
2023.5.17 503 5/17/2023
2023.4.28 580 4/28/2023
2023.3.14 1,441 3/14/2023
2023.3.7 710 3/7/2023
2023.2.21 937 2/21/2023
2023.2.20 763 2/20/2023
2023.2.17.100 666 2/17/2023
2023.2.1.108 685 2/1/2023
2023.2.1.107 673 2/1/2023
2023.2.1.106 669 2/1/2023
2023.2.1.105 666 2/1/2023
1.0.0 734 2/1/2023