You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@poi.apache.org by hdumbre <hd...@globeop.com> on 2013/02/22 14:02:43 UTC
how remove password protection from large xlsx file
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
--
View this message in context: http://apache-poi.1045710.n5.nabble.com/how-remove-password-protection-from-large-xlsx-file-tp5712178.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@poi.apache.org
For additional commands, e-mail: user-help@poi.apache.org