[openxls-develop] Fwd: Crash reading simple XLS file
Brought to you by:
aryaniae,
extentechjohn
|
From: Nick P. <nb...@gm...> - 2014-01-10 18:46:46
|
Anyone see why the following test case crashes? Test Excel file available here: https://dl.dropboxusercontent.com/u/107816727/Test.xls public class OpenXLSTest { @Test public void testCreateWorksheetAndSetValue() throws Exception { try( InputStream inp = OpenXLSTest.class.getResourceAsStream( "/excel-templates/Test.xls" ) ) { WorkBookHandle wbh = new WorkBookHandle( inp ); WorkSheetHandle worksheetHandle = wbh.getWorkSheet( "Test" ); CellHandle cellHandle = worksheetHandle.getCell( "B4" ); cellHandle.setVal( "Test" ); ColHandle colHandle = worksheetHandle.getCol( 0 ); // Why does this trigger an ArrayIndexOutOfBoundsException ? colHandle.getCells(); } } } Stack: java.lang.ArrayIndexOutOfBoundsException: 0 at com.extentech.formats.XLS.Mulblank.getIxfe(Mulblank.java:401) at com.extentech.ExtenXLS.CellHandle.setMulblank(CellHandle.java:201) at com.extentech.ExtenXLS.CellHandle.<init>(CellHandle.java:224) at com.extentech.ExtenXLS.ColHandle.getCells(ColHandle.java:375) at com.test.OpenXLSTest.testCreateWorksheetAndSetValue(OpenXLSTest.java:32) |