//定义默认查找替换选项
FindReplaceOptions options = new FindReplaceOptions();
options.setReplacingCallback(new ReplaceWithCustomTableHandler(tableData));
// 替换表格占位符
document.getRange().replace(placeholderName, "", options);
…...List<String> headers = (List<String>) tableData.get("header"); // 表头...DocumentTableUtil.addTable(builder, doc, headers, tableDataList); //删除占位符 args...