atq

导航

 
点击查看代码
XSSFWorkbook wb = new new XSSFWorkbook();
wb.setForceFormulaRecalculation(true);
OutputStream os = response.getOutputStream();
EncryptionInfo info = new EncryptionInfo(EncryptionMode.standard);
Encryptor enc = info.getEncryptor();
enc.confirmPassword("123456");
POIFSFileSystem poifsFileSystem = new POIFSFileSystem();
OutputStream encryptOutPutStream = enc.getDataStream(poifsFileSystem);
wb.write(encryptOutPutStream);
encryptOutPutStream.close();
poifsFileSystem.writeFilesystem(os);
wb.close();
posted on 2022-09-28 16:34  atq  阅读(676)  评论(0)    收藏  举报