SharpDocx 2.2.0
Install-Package SharpDocx -Version 2.2.0
dotnet add package SharpDocx --version 2.2.0
<PackageReference Include="SharpDocx" Version="2.2.0" />
paket add SharpDocx --version 2.2.0
#r "nuget: SharpDocx, 2.2.0"
// Install SharpDocx as a Cake Addin
#addin nuget:?package=SharpDocx&version=2.2.0
// Install SharpDocx as a Cake Tool
#tool nuget:?package=SharpDocx&version=2.2.0
SharpDocx enables you to generate Word documents based on a view. The view itself is a Word document and can be as simple or complex as you want.
- Use C# code inside the view for inserting text, images or tables.
- Supports the MVC pattern, so you can use your own C# model in the template.
- Supports .NET Framework 3.5/4.5+, .NET Standard 2.0, .NET Core 3.1, .NET 5.0 and .NET 6.0.
- Based on Microsoft's Open XML SDK.
- Source code, tutorial and examples on GitHub.
Product | Versions |
---|---|
.NET | net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows |
.NET Core | netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1 |
.NET Standard | netstandard2.0 netstandard2.1 |
.NET Framework | net35 net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48 |
MonoAndroid | monoandroid |
MonoMac | monomac |
MonoTouch | monotouch |
Tizen | tizen40 tizen60 |
Xamarin.iOS | xamarinios |
Xamarin.Mac | xamarinmac |
Xamarin.TVOS | xamarintvos |
Xamarin.WatchOS | xamarinwatchos |
-
.NETFramework 3.5
- DocumentFormat.OpenXml (>= 2.15.0)
-
.NETFramework 4.5
- DocumentFormat.OpenXml (>= 2.15.0)
-
.NETStandard 2.0
- DocumentFormat.OpenXml (>= 2.15.0)
- Microsoft.CodeAnalysis.CSharp (>= 2.10.0)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on SharpDocx:
Package | Downloads |
---|---|
TS.AppFramework
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version 2.2.0 - January 20, 2022
- Added support for Visual Studio Code and Visual Studio 2022.
- If a view gets updated it will now be recompiled automatically.
- A copy of the view to a temporary file is now only made in Debug builds.
- The SharpDocx IDE now also supports a document viewer in .NET Core 3.1, .NET 5.0 and .NET 6.0. However, you have to specify the location of the viewer.
- Added .NET 6.0 as a target framework for the samples.
- Updated DocumentFormat.OpenXml to 2.15.0.
- Fixed issue #37 (NullReferenceException).
- Fixed large image overflow bug.
Version 2.1.0 - October 16, 2021
- Added an overload for the Generate method that returns a stream (issue #8 and #9).
- Added support for Source Link.
- Updated samples to .NET Core 3.1.
- Updated DocumentFormat.OpenXml to 2.13.1.
- Fixed issue #34.
- Fixed issue #36.
Version 2.0.4 - August 8, 2020
- Fixed issue #21.
Version 2.0.3 - July 28, 2020
- Fixed issue #18.
Version 2.0.2 - March 14, 2020
- Fixed issue #4 and #14.
Version 2.0.1 - February 7, 2020
- Supports templates in loops and if-statements.
- Templates can be nested (see tutorial).
Version 1.2.1 - December 23, 2019
- Upgraded to DocumentFormat.OpenXml 2.9.1.
- Fixed issue with NuGet dependencies.
Version 1.2.0 - February 22, 2019
- Added support for .NET Standard 2.0.
Version 1.1.0 - January 4, 2018
- Some performance improvements.
- You can now specify a view model when calling Document.Generate.
- Tidied up API.
Version 1.0.0 - January 1, 2018
- Initial version.