Skip to main content

Example projects demonstrating how to use the Openize.OpenXML-SDK library to work with Office documents. Includes samples for Excel, Word, and PowerPoint manipulation.

Total Downloads
530
530
Published
May 24, 2025
1y ago

Get Started

dotnet add package Openize.OpenXML-SDK.Examples --version 25.5.0
ProductVersions
Other
.NETCoreApp3.1

README

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.

Downloads by Version

Similar & Alternative Packages

Hand-picked matching NuGet libraries based on tags & ecosystem

Depended On By

Find packages that declare this package as a dependency. NuGet does not provide a reverse-dependency endpoint, so candidates are checked on demand.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

No SPDX license expression is published. Review the license text and your organisation's policy before redistribution.Compatibility metadata lists 1 target framework; confirm the exact target used by your application.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.