posted 11 years ago
Hi All,
I m using POI.3.8 , i have one requirement to strip the password from xlsx file.
I m using following code,
POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(path));
EncryptionInfo info = new EncryptionInfo(fs);
Decryptor d = Decryptor.getInstance(info);
if (d.verifyPassword(password)) {
XSSFWorkbook wb = new XSSFWorkbook(d.getDataStream(fs));
FileOutputStream fi = new FileOutputStream(path);
wb.write(fi);
fi.close();
It is working fine with me for 2-5 MB file ,but some input files are more than 50MB , it taking more time and also giving OutOffMemoryException,then i increase my ram size to 8GB but still no luck...
Please help me if some one knows any solution for this
Thanks in advance