CompuMaster.Excel.MicrosoftExcel 2026.11.12

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

CompuMaster.Excel.MicrosoftExcel

A library to access and edit Excel files with common interface CompuMaster.Excel.ExcelOps for several Excel engines

Use Microsoft.Office.Interop.Excel v15 (MS Office 2013) or higher, 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

For a full engine overview and comparison chart, please see https://github.com/CompuMasterGmbH/CompuMaster.Excel/blob/main/README.md

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

Excel diagnostic logs

MsExcelDataOperations.DiagnosticLogFiles and MsExcelApplicationWrapper.DiagnosticLogFiles return read-only snapshots of existing, positively associated Office diagnostic logs. Reading these properties does not start Excel or create logs. Surviving paths remain available after closing the application.

PreserveDiagnosticLogFiles defaults to false and is shared by workbooks using the same Excel process. After the existing shutdown sequence confirms that the exact process has exited, a successful quit with exit code zero removes its associated logs. An error or forced exit retains them and trims only trailing NUL padding, preserving Unicode terminal code units. Set PreserveDiagnosticLogFiles = true to leave every log byte unchanged, including padding.

BOMs and recognizable Office headers identify the text encoding. Ambiguous BOM-less logs may retain up to three trailing padding bytes to protect UTF-16/UTF-32 terminal code units.

Ownership requires the process ID and start time, valid log timestamps, and the Primary/Additional session GUID. A query-only Windows Restart Manager session can identify exclusively locked Primary logs. Unknown formats, uncertain ownership, inaccessible or replaced files, and reparse points are skipped. Housekeeping never changes the existing Quit/COM-release/wait/kill sequence or Office logging settings. Housekeeping makes at most three attempts, waiting 350 ms between attempts. A host crash cannot run in-process housekeeping.

Quick-Start: Create a workbook and put some values and formulas, then output the result to console

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

Showing the top 1 NuGet packages that depend on CompuMaster.Excel.MicrosoftExcel:

Package Downloads
CompuMaster.Excel.Tools.MicrosoftAndEpplus

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.11.12 0 11/12/2026
2026.10.9 200 10/9/2026
2026.10.8.1 132 10/8/2026
2026.10.8 124 10/8/2026
2026.10.7.1 129 10/7/2026
2026.10.7 127 10/7/2026
2026.9.29 138 9/29/2026
2026.9.28 137 9/28/2026
2026.8.31 149 8/31/2026
2026.7.30.1 170 7/30/2026
2026.7.30 167 7/30/2026
2026.4.30 290 4/30/2026
2026.2.5.1 188 2/5/2026
2026.2.5 175 2/5/2026
2026.2.4.2 175 2/4/2026
2026.2.4.1 173 2/4/2026
2026.2.4 171 2/4/2026
2025.12.30 195 12/29/2025
2025.12.26 206 12/26/2025
2025.12.24 246 12/24/2025
Loading failed