核心代码如下所示
using System.Collections.Generic;
using System.IO;
using NPOI.XWPF.UserModel;
using UnityEngine;
using Debug = UnityEngine.Debug;
/// <summary>
/// NPOI库的桥接代码辅助器
/// </summary>
public static class NPOIHelper
{
#region docx
/// <summary>
/// 通过识别模板中的关键字,进行图文替换
/// </summary>
public static void ReplaceByKeywords(List<OutputConfigData> datas, string templatePath, string outputPath)
{
if (!File.Exists(templatePath))
{
Debug.Log($"> output list word template cant find");
return