Nick Pratt wrote:
> Anyone see why the following test case crashes?
A bug?
I tried this in Octave (OSS Matlab lookalike) where one can
interactively process Java methods, and I get the same results; for
*any* columnHandle.
(Hmmm.... traffic is low on this list; my own question from two weeks
ago hasn't received an answer yet.....)
Philip
> 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)
>
>
>
>
>
> ------------------------------------------------------------------------------
> CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For
> Critical Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
>
>
>
> _______________________________________________
> openxls-develop mailing list
> ope...@li...
> https://lists.sourceforge.net/lists/listinfo/openxls-develop
>
|