Free Support Forum -

Sorting is not Working of 4000 rows using Java

#1 (709.0 KB)
Aspose Workbook is not accepting this Excel sheet.
Exception throwing “java.lang.ArrayIndexOutOfBoundsException: -32768”.
I am using Aspose cell jar version: 18.9 , Excel file format: .XLSX.

Kindly find the attachment. Plz give a solution!



Thanks for the template files.

After an initial test, I am able to observe the issue as you mentioned. I found an exception “java.lang.ArrayIndexOutOfBoundsException: -32768” when loading your XLSX files.
I have logged a ticket with an id “CELLSJAVA-42799” for your issue.

We will look into it soon.

Once we have an update on it, we will let you know here.



Please check which tools are used to create this file, there are some invalid records as the following:

<xf applyFont=“true” borderId=“0” fillId=“0” fontId="-31948" numFmtId=“0” xfId=“0”>
<alignment horizontal=“right”/>

We will ignore these records to fix this issue.


Thanks for responding. I found solution but i have to convert
xlsx to xls and again convert xls to xlsx Then only its work. Is there any simple solution for this ?

kindly see my attached file: (962.3 KB)

How to remove this from my excel. I can’t find where it is

<xf applyFont=“true” borderId=“0” fillId=“0” fontId="-31948" numFmtId=“0” xfId=“0”>
<alignment horizontal=“right”/>



Could you just spare us a little time (3-5 working days or so). Hopefully we will fix (as we told you that we will ignore such kind of invalid records) it and provide you the fixed version here.

Keep in touch.


Thanks,i’m waiting dude. I attatched my project file . if u need use this (712.5 KB)



Thanks for the sample project.

So, you are using Apache POI APIs to generate such files. We have logged your project against your issue into our database for evaluation.

Once we have an update on it or we figure your issue out, we will let you.



Please try our latest version/fix: Aspose.Cells for Java v18.12.9 (attached)

Your issue should be fixed in it.

Let us know your feedback.
Aspose.Cells for (6.4 MB)


Thank lot dude. Its awesome. Its Worked I got Output.



Good to know your issue is sorted out by the new fix/version. Feel free to contact us any time if you have further queries or issue, we will be happy to assist you soon.


The issues you have found earlier (filed as CELLSJAVA-42799) have been fixed in Aspose.Cells for Java 19.1. You can also get the latest Aspose.Cells for Java version from Maven repos. with simple configurations. Please see the document for your reference:

This message was posted using BugNotificationTool from Downloads module by Amjad_Sahi