spire.xls for java 4.2.0已发布。该版本支持数字签名,增加透视表分组和取消分组的功能。此外,该版本还增强了转换excel到图片/pdf的功能。详情请阅读以下内容。
新功能:
- 支持数字签名
getcertandprivatekeyfrompfx certandprivatekeyfrompfx=new getcertandprivatekeyfrompfx();
hashmap<x509certificate,privatekey> hashmap=certandprivatekeyfrompfx.getcertandprivatekeyfrompfx(inputfile_pfx);
idigitalsignatures dsc = workbook.adddigitalsignature(hashmap.keyset().iterator().next(), hashmap.get(hashmap.keyset().iterator().next()), "e-iceblue", calendar.gettime());
workbook.isdigitallysigned();
workbook.removealldigitalsignatures();
//group
workbook wb = new workbook();
wb.loadfromfile(inputfile);
worksheet sheet = wb.getworksheets().get("sheet1");
xlspivottable pt = (xlspivottable)sheet.getpivottables().get(0);
pivotfield r1 = (pivotfield)pt.getpivotfields().get("count");
pt.setmanualgroupfield(r1,7,15, enumset.of(pivotgroupbytype.rangeofvalues),5);
wb.savetofile(outputfile, excelversion.version2013);
wb.dispose();
//ungroup
workbook wb = new workbook();
wb.loadfromfile(inputfile);
worksheet sheet = wb.getworksheets().get("sheet1");
xlspivottable pt = (xlspivottable)sheet.getpivottables().get(0);
pivotfield r1 = (pivotfield)pt.getpivotfields().get("count");
pt.setungroup(r1);
wb.savetofile(outputfile, excelversion.version2013);
wb.dispose();
问题修复:
- 修复了转换excel到pdf行高不正确的问题
- 修复了插入特殊符号结果文档打开提示内容错误的问题
- 修复了插入的ole文件双击无法打开的问题
- 修复了转excel到图片图表数据丢失的问题
- 修复了linux系统转excel到pdf抛异常“specified argument was out of the range of valid values”的问题
- 修复了转换excel到pdf抛异常“numberformatexception”的问题
下载spire.xls for java 4.2.0,请点击: