DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=36947>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=36947 Summary: HSSF won't correctly copy/modify a sheet containing comments Product: POI Version: 3.0-dev Platform: PC OS/Version: Windows XP Status: NEW Severity: major Priority: P2 Component: HSSF AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] Reading up on the issue suggested that similar bugs have been reported, once a given spreadsheet is copied and modified, excel returns an error on opening about the file being too damaged to open. Experimenting with they issue lead me to the conclusion it was only doing on certain spreadsheets, while others would work perfectly, specifically once I deleted the 'comments' from the spreadsheet in question (i'll attach it) it worked correctly. public void testModify(String filename) { try { in = new FileInputStream("exists.xls"); fs = new POIFSFileSystem(in); HSSFWorkbook wb = new HSSFWorkbook(fs); FileOutputStream stream = new FileOutputStream("exists-copy.xls"); HSSFSheet sheet = wb.getSheetAt(0); HSSFRow row = sheet.getRow(5); HSSFCell cell = row.getCell(( short ) 5); cell.setCellType(HSSFCell.CELL_TYPE_NUMERIC); cell.setCellValue(9999); wb.write(stream); stream.close(); } catch (Exception e) { e.printStackTrace(); } } Both 2.5.1-final and poi-bin-3.0-alpha1-20050704 appear to have the same problem. -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta POI Project: http://jakarta.apache.org/poi/
