Openize.OpenXML-SDK.Examples 25.4.0

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

Openize.OpenXML-SDK.Examples

Openize.OpenXML-SDK.Examples is a collection of code samples demonstrating how to use the Openize.OpenXML-SDK for .NET library to work with Office documents. These examples provide practical guidance for developers looking to implement document handling features in their .NET applications.

Features

  • Excel Examples: Create workbooks, manage worksheets, manipulate cells, work with formulas and hyperlinks.
  • Word Examples: (Coming soon) Examples for working with Word documents.
  • PowerPoint Examples: (Coming soon) Examples for working with PowerPoint presentations.

Project Structure

  1. Openize.OpenXML-SDK.Examples: Core library containing example code classes
    • Excel: Examples for Excel operations
    • Word: Examples for Word operations
    • PowerPoint: Examples for PowerPoint operations
  2. Openize.OpenXML-SDK.Examples.Usage: Console application to run and demonstrate the examples

Installation

These examples are designed to work with the Openize.OpenXML-SDK library. You can either:

  1. Clone this repository and open the solution in Visual Studio
  2. Install the NuGet package to reference the examples directly: Install-Package Openize.OpenXML-SDK.Examples

Usage

Excel Workbook Examples

// Create a new instance of WorkbookExamples
var workbookExamples = new Openize.OpenXML_SDK.Examples.Excel.WorkbookExamples();

// Create an empty workbook
workbookExamples.CreateEmptyWorkbook();

// Create a workbook with multiple sheets
workbookExamples.CreateWorkbookWithMultipleSheets();

// Create a workbook with custom properties
workbookExamples.CreateWorkbookWithProperties();

Excel Worksheet Examples

// Create a new instance of WorksheetExamples
var worksheetExamples = new Openize.OpenXML_SDK.Examples.Excel.WorksheetExamples();

// Create a worksheet with custom name
worksheetExamples.CreateRenamedWorksheet();

// Create a protected worksheet
worksheetExamples.CreateProtectedWorksheet();

// Modify column widths and row heights
worksheetExamples.ModifyColumnWidthAndRowHeight();

Excel Cell Examples

// Create a new instance of CellExamples
var cellExamples = new Openize.OpenXML_SDK.Examples.Excel.CellExamples();

// Create a workbook with different cell data types
cellExamples.CreateCellsWithDifferentDataTypes();

// Create a workbook with formulas
cellExamples.CreateCellsWithFormulas();

// Create a workbook with hyperlinks
cellExamples.CreateCellsWithHyperlinks();

Example Runner

The included console application provides an interactive way to explore all available examples:

Openize.OpenXML-SDK Examples
============================

Choose an example to run:
1. Workbook Examples
2. Worksheet Examples
3. Cell Examples
0. Exit

Enter your choice:

Contributing

Contributions are welcome! Please feel free to submit a pull request with additional examples. For significant changes, please open an issue first to discuss what you would like to contribute.

License

This project is licensed under the MIT License. See the LICENSE file for details.

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. 
.NET Core netcoreapp3.1 is compatible. 
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

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
25.4.0 119 4/25/2025

Initial release with the following examples:
   - Excel: WorkbookExamples for creating and managing workbooks
   - Excel: WorksheetExamples for worksheet operations
   - Excel: CellExamples for cell manipulation, formulas, and hyperlinks
   - Console application to demonstrate examples in action