Good Work Kendall! vic
-----Original Message----- From: Kendall Coolidge [mailto:[EMAIL PROTECTED]] Sent: Friday, January 24, 2003 4:14 PM To: POI Users List Subject: RE: Problem opening .xls in Win98/Excel 97 (Excel page fault) Hi Vic and Shail, I did find the problem. (I think, at least what I did fixed it.) I was creating a cell style that apparently is invalid in Excel97: HSSFCellStyle csDate3 = wb.createCellStyle(); csDate3.setDataFormat(HSSFDataFormat.getFormat("m/yy")); When I found it didn't give me the format I wanted, I left the code in place, but didn't apply the style (csDate3) to any cell. Bad idea! When I commented it out, everything worked. I believe it was in POI 1.5.1. It only happened in Excel 97 Hope this helps! Kendall -----Original Message----- From: Victor LaLoggia [mailto:[EMAIL PROTECTED]] Sent: Friday, January 24, 2003 2:41 PM To: POI Users List Subject: RE: Problem opening .xls in Win98/Excel 97 (Excel page fault) Hey Kendall; This is what I am doing and it seems to work : HttpSession theSession = request.getSession(false); HSSFWorkbook wb = HSSFWorkbook)theSession.getAttribute(RoyaltyManagementConstants.EXCEL_DU MP); response.setContentType("application/vnd.ms-excel"); ServletOutputStream os = response.getOutputStream(); wb.write(os); os.flush(); os.close(); Let me know if it works! vic -----Original Message----- From: Shail Mehta [mailto:[EMAIL PROTECTED]] Sent: Friday, January 24, 2003 2:38 PM To: 'POI Users List' Subject: RE: Problem opening .xls in Win98/Excel 97 (Excel page fault) I am encountering exactly the problem. Any help will be truly appreciated. thanks shail -----Original Message----- From: Kendall Coolidge [mailto:[EMAIL PROTECTED]] Sent: Wednesday, October 09, 2002 4:42 PM To: [EMAIL PROTECTED] Subject: Problem opening .xls in Win98/Excel 97 (Excel page fault) 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]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
