YFTools.WordTemplateFill 1.0.0

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package YFTools.WordTemplateFill --version 1.0.0
                    
NuGet\Install-Package YFTools.WordTemplateFill -Version 1.0.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="YFTools.WordTemplateFill" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="YFTools.WordTemplateFill" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="YFTools.WordTemplateFill" />
                    
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 YFTools.WordTemplateFill --version 1.0.0
                    
#r "nuget: YFTools.WordTemplateFill, 1.0.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 YFTools.WordTemplateFill@1.0.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=YFTools.WordTemplateFill&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=YFTools.WordTemplateFill&version=1.0.0
                    
Install as a Cake Tool
  1. 处理模板文件
    1. 提前处理好模板文件所有的样式,包括且不限于文本格式、段落格式、页眉页脚、水印等。模板文件限定 docx 格式。
    2. 需要进行文本赋值的,将文本替换为 $FieldName$ 。
    3. 需要进行表格赋值的,将表格内容行数调整为一行,并将每个单元格的文本设置为 #TableName#ColumnName# 。
  2. 处理数据Model
    1. 文本赋值字段名称,与模板中 FieldName 相对应,限定 String 类型。
    2. 表格赋值字段名称,与模板中 TableName 相对应,限定 List<T> 类型。T 成员字段名称,与模板中 ColumnName 相对应,限定 String 类型。
  3. 示例
 var model = InitModel(); // 获取数据Model
 var helper = new WordTemplateHelper(templateFilePath).SetData(model); //生成文件

 helper.SaveToFile(savePath); // 保存文件至指定路径
 helper.SaveToByteArray(); // 获取文件字节数组
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 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.  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 Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.5

  • net6.0

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