jQuery in Action, 3rd edition
The moose likes Other JSE/JEE APIs and the fly likes IndexOutOfBoundsException in jxl API while creating workbook from existing workbook Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Bookmark "IndexOutOfBoundsException in jxl API while creating workbook from existing workbook" Watch "IndexOutOfBoundsException in jxl API while creating workbook from existing workbook" New topic

IndexOutOfBoundsException in jxl API while creating workbook from existing workbook

Anupam Jain
Ranch Hand

Joined: Mar 16, 2010
Posts: 61

Hello Everyone,

I'm using jxl API : jxl-2.6.10.jar and have following line(s) of code in my project:

While the above code runs fine for a number of cases, the second statement is giving following exception in few cases (no specific case characteristic to separate out such cases from others).

I've been trying to resolve this for like hours now... search the whole Google may be... Found the following link of some IRC logs discussing this problem but without any solution...
URL (Look for the name 'thinkstu')

Has anyone seen this kind of problem with the jxl API before? Please help..

Paul Clapham

Joined: Oct 14, 2005
Posts: 19750

I assume that when you say "jxl" you are referring to the JExcel project? I ask because googling for "jxl" leads to Java projects which don't have anything to do with Excel workbooks.

Anyway, in case you haven't already found it, JExcel has a mailing list with (so it claims) searchable archives here. That would be the best place to find out the answer to your question.
Sanjay Sridhar

Joined: Dec 12, 2012
Posts: 1
Hello guys,
I still face the same issue. Could you please give solution to the error.
Just to represent - IndexOutOfBoundsException in jxl API while creating workbook

Exception in thread "main" java.lang.IndexOutOfBoundsException: Index: 24, Size: 23
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at jxl.biff.FormattingRecords.getXFRecord(FormattingRecords.java:338)
at jxl.read.biff.CellValue.getCellFormat(CellValue.java:144)
at jxl.write.biff.CellValue.<init>(CellValue.java:127)
at jxl.write.biff.LabelRecord.<init>(LabelRecord.java:116)
at jxl.write.Label.<init>(Label.java:79)
at jxl.write.biff.SheetCopier.shallowCopyCell(SheetCopier.java:801)
at jxl.write.biff.SheetCopier.shallowCopyCells(SheetCopier.java:927)
at jxl.write.biff.SheetCopier.copySheet(SheetCopier.java:213)
at jxl.write.biff.WritableSheetImpl.copy(WritableSheetImpl.java:1539)
at jxl.write.biff.WritableWorkbookImpl.copyWorkbook(WritableWorkbookImpl.java:971)
at jxl.write.biff.WritableWorkbookImpl.<init>(WritableWorkbookImpl.java:343)
at jxl.Workbook.createWorkbook(Workbook.java:339)
at jxl.Workbook.createWorkbook(Workbook.java:320)
at generate_report_xmls.generate_prompts(generate_report_xmls.java:387)
at report_retrieval.generate_prompts(report_retrieval.java:406)
at create_excel.parseMetaData_liveServer(create_excel.java:644)
at create_excel.main(create_excel.java:720)
at Automation.main(Automation.java:36)
I agree. Here's the link: http://aspose.com/file-tools
subject: IndexOutOfBoundsException in jxl API while creating workbook from existing workbook
jQuery in Action, 3rd edition