api 修改单元格内容后没生效
下面是我的代码,set 后文件内容并没有修改,请问是什么原因呢
ReportDefine rd=(ReportDefine) ReportUtils.read(rpxFileName);// 读取报表文件
ParamMetaData pmd=rd.getParamMetaData();// 获取报表参数对象
if(pmd != null){
int pmcount=pmd.getParamCount();// 获取参数个数
for(int i=0;i<pmcount;i++) {
if (pmd.getParam(i).getValue()!= null && !pmd.getParam(i).getValue().isEmpty()){
Pattern pattern = Pattern.compile(“\b”+Pattern.quote(param1)+“\b”, Pattern.CASE_INSENSITIVE);
Matcher matcher = pattern.matcher(pmd.getParam(i).getValue());
pmd.getParam(i).setValue(matcher.replaceAll(Matcher.quoteReplacement(param2)));
}
}
}
0 打赏
打赏 100 积分后可见
