BroggiSoft.OfficeExport 1.7.0

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

BroggiSoft.OfficeExport

Generate documents with the BroggiSoft.OfficeExport package. Simply use the tag system to transform your templates into final Word, Excel or PowerPoint documents. The package will retain the font, size, and other formatting, and can generate rows in a table if the object is an array, or replace an existing rectangle shape with your image (your logo for example). Leave the management of documents (contracts, letters, etc.) to the business users, while developers only need to supply the data model in the form of a dictionary, JSON, or object to seamlessly populate your Word, Excel, or PowerPoint documents.

Features

  • Replace simple text tags in Word, Excel and PowerPoint templates with JSON, dictionary or object types.
  • Support for arrays, you can send an array of objects, of string, of int... and it will add as many rows in a Word, Excel or PowerPoint table.
  • Support for images, you can add an image from a base64 format.

How to use

  • Create a template (Word, Excel or PowerPoint) with tags, for example {{city}}
  • Create a JSON, dictionary or object with the corresponding values
  • Use BroggiSoft.OfficeExport to replace the tags with the values and generate the final document
  • For an array, create a table in your template et set a tag in a row like {{YourArray[i].YourProperty}} or {{YourArray[2].YourProperty}} for a specific position. This will add as many rows as there are in the array. {{Product[i].Price}} : for each product a row will be added in the table and set the value Price of this product.
  • For add an image, insert a rectangle shape with the excpected size int your template, and set in this shape a text tag {{IMG=YourNameTag}}, the value of your image must be in base64 format.

Examples

        string jsonValues = "{\"name\":\"John\",\"city\":\"New York\"}";

        OfficeExport.ExportFromJson("WordTemplate.docx", "WordResult.docx", jsonValues);

//Or with an object:

        ExampleModel example = new ExampleModel();
        example.value1 = "Hello";
        example.value2 = "World";

        OfficeExport.ExportFromObject("WordTemplate.docx", "WordResult.docx", example);

Use

This tool is completely free. All the necessary documentation can be found at: https://www.broggisoft.com/wiki

Terms and conditions can be found here: https://www.broggisoft.com/termsandconditions

If you have any questions, please don't hesitate to contact me at contact@broggisoft.com.

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 is compatible.  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 is compatible.  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 is compatible.  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. 
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
1.7.0 273 11/29/2024
1.6.0 334 7/7/2023
1.5.0 483 1/22/2023
1.4.0 578 11/4/2022
1.3.0 541 10/21/2022
1.2.0 577 10/14/2022
1.1.2 536 8/26/2022