On Fri, 4 Jun 2010, TARAF, WALID (ATTSI) wrote:
We have an issue where we have a Unix box with a few vtiers, and when a
user first creates an XLSX, it creates the file under
"/var/tmp/poifiles" with a random file name....
Take a look at org.apache.poi.util.TempFile for how this comes about.
IIRC, it's something about opening and saving that triggers the need to
use a temp file.
You could either tell poi not to remove the tmp directory at the end (see
TempFile), or fix up the permissions on newly created tmp directories (ask
a friendly unix sysadmin if you don't know how)
FileInputStream inputStream = new
FileInputStream(new File(EXCEL_LOCKED_TEMPLATE));
wb = new XSSFWorkbook(inputStream);
This may not help. Just pass the file to XSSF directly, rather than
wrapping it in an InputStream, that way there won't be any buffering
Nick
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]