https://issues.apache.org/bugzilla/show_bug.cgi?id=46938
--- Comment #1 from Maksym Symonov <maksym_symo...@epam.com> 2009-03-30 07:31:57 PST --- Created an attachment (id=23426) --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23426) test xls file for a test case InputStream in = null; OutputStream out = null; try { in = new FileInputStream( new File("D://foo.xls") ); HSSFWorkbook workbook = new HSSFWorkbook( in ); HSSFSheet existingSheet = workbook.getSheet( "existing" ); HSSFCellStyle style = existingSheet.getRow( 0 ).getCell( 0 ).getCellStyle(); HSSFSheet sheet = workbook.createSheet( "test" ); workbook.createCellStyle(); sheet.createRow( 0 ).createCell( 0 ).setCellStyle( style ); workbook.setActiveSheet( 1 ); out = new BufferedOutputStream( new FileOutputStream( new File("D://new.xls") ) ); workbook.write( out ); } catch( Exception e ) { e.printStackTrace(); } finally { IOUtils.closeQuietly( in ); IOUtils.closeQuietly( out ); } -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org For additional commands, e-mail: dev-h...@poi.apache.org