Dear Colleagues,
I am having a problem that I hope someone has come across and has some
advice.
I am creating a workbook in a Struts action class and streaming it to
the browser. My "ExcelQuery" class is a POI wrapper that returns the
finished workbook. Here is a snippet from my DisplayResultsAction
class:
// execute the ExcelQuery and write the results to the stream
if (excelquery != null) {
HSSFWorkbook wb = excelquery.getWorkbookSQL(user, messages);
ServletOutputStream stream = response.getOutputStream();
String fileName = selectedQuery + ".xls";
response.setHeader(
"Content-Disposition",
"attachment; filename=\"" + fileName + "\"");
response.setContentType("application/vnd.ms-excel");
wb.write(stream);
stream.flush();
stream.close();
return (null);
}
The user sees a File Download dialog that allows them to Open or Save
the Excel file. Either choice works GREAT in Win2000/Office2000,
XP/OfficeXP, but causes an Excel error in Win98/Excel97 SR-2(version
8.0e). The error says:
"EXCEL caused an invalid page fault in module EXCEL.EXE at
0177:300fa329."
If I take the offending xls to a different computer, Excel/XP or
Excel/2000 can open the xls just fine. If I run my download on an XP
machine and move the xls from there to the Win98 machine, I get the
error. I installed the latest Excel patch (version 8.0l), but still no
luck. At least one person running Excel 97 on Win2000 has been able to
open the file, but most versions of Excel 97 that we have tried fail.
Any assistance would be greatly appreciated!
Thanks very much
Kendall
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>