After I generate a password protected xlsx file with apache poi, I modify file content with XSSFWorkbook.like:
File file = new File("Test2.xlsx");
XSSFWorkbook wb = (XSSFWorkbook) WorkbookFactory.create(file, "password");
wb.createSheet("Test0001");
try (FileOutputStream fileOutputStream = new FileOutputStream(file)) {
wb.write(fileOutputStream);
} finally {
wb.close();
}
when I reopen the file, the file was no longer password protected,Apache POI and poi-ooxml version:5.2.1.Maybe poi not support modify password protected xlsx file?
is there anyway modify password protected xlsx file with apache poi?