第一步,word模板的处理
1.选中要处理的部分,点击插入,找到文档部件
2.选中域
做如下操作:
第二步:后台代码的编写
package net.ghsoft.calibration.modules.common.utils;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;
import com.aspose.words.Document;
import com.aspose.words.FindReplaceOptions;
import net.ghsoft.calibration.modules.resultoutput.entity.Result;
import net.ghsoft.general.common.utils.StringUtils;
public class WordUtils {
private static Map<String, String> dataMap = new HashMap<String, String>();
public stati