DocMaker 2.0.1
.NET 6.0
This package targets .NET 6.0. The package is compatible with this framework or higher.
.NET Core 3.0
This package targets .NET Core 3.0. The package is compatible with this framework or higher.
.NET Standard 2.1
This package targets .NET Standard 2.1. The package is compatible with this framework or higher.
dotnet add package DocMaker --version 2.0.1
NuGet\Install-Package DocMaker -Version 2.0.1
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="DocMaker" Version="2.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DocMaker" Version="2.0.1" />
<PackageReference Include="DocMaker" />
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 DocMaker --version 2.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: DocMaker, 2.0.1"
#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 DocMaker@2.0.1
#: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=DocMaker&version=2.0.1
#tool nuget:?package=DocMaker&version=2.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
DocMaker
A versatile library for generating Word documents with content data and creating tables is crucial for many applications. This library not only supports the creation of detailed Word documents but also enables generating Excel files using predefined templates, even with very large datasets, ensuring consistency and efficiency in document automation.
Adding content data to Word document
var wordBuilder = new WordBuilder();
var template = wordBuilder.CreateTemplate();
//key - name of content data wrapper in your Word document, value - raw data
template.FieldsCollection.Add("test_data", "OMG! THIS IS THE TEST DATA");
//here stream is the Stream of your template
var result = await wordBuilder.BuildAsync(stream, template);
Adding tables to Word document
var wordBuilder = new WordBuilder();
var template = wordBuilder.CreateTemplate();
var docTables = new List<DocTable>();
//each table object contains rows and cells.
var firstTable = new DocTable();
//you can pass symbol '-' to merge cells in your table
firstTable.AddRow(["FirstTableData1", "FirstTableData2", "FirstTableData3",
"FirstTableData4", "FirstTableData5"]);
docTables.Add(firstTable);
template.Tables = docTables.ToArray();
//here stream is the Stream of your template
//BuildAsync method will find any tables in your Word template(it should contains headers or something)
//and will add new rows and cells
var result = await wordBuilder.BuildAsync(stream, template);
Generate Excel files
var excelBuilder = new ExcelBuilder();
//create copy of your template
var workFile = excelBuilder.CreateWorkFile(FilePath, OutputPath, OutputFileName);
//create object with all data
var data = new ExcelDataRows
{
Rows = new List<ExcelRow>(countRows)
};
//add some data
data.Rows.Add(new ExcelRow
{
RowIndex = 1,
Cells = new Dictionary<string, string> { { "B1", "User" } }
});
//fill data to your result file. you can pass any sheet name that you need to process
await excelBuilder.SetContentToFileAsync(workFile, "Sheet1", data);
License
The DocMaker is licensed under the MIT license.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. 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 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 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 Core | netcoreapp3.0 is compatible. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 3.0
- DocumentFormat.OpenXml (>= 2.19.0)
-
.NETCoreApp 3.1
- DocumentFormat.OpenXml (>= 2.19.0)
-
.NETStandard 2.1
- DocumentFormat.OpenXml (>= 2.19.0)
-
net6.0
- DocumentFormat.OpenXml (>= 2.19.0)
-
net8.0
- DocumentFormat.OpenXml (>= 2.19.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.