Getting Exception while removing sheet from Workbook

Hi Team getting exception while removing the sheet from workbook.
Below is the code snippet for which we started receiving exception from aspose side while removing the sheet.

public void Test() throws Exception {
    LoadOptions opt  = new LoadOptions();
    opt.setMemorySetting(MemorySetting.MEMORY_PREFERENCE);
    Workbook output = new Workbook("C:\\work\\CF12717\\Trial.xls",opt);
    output.getWorksheets().removeAt("ChartData");
}

Exception we get is as follows :

java.lang.NullPointerException: Cannot read field "c" because "<parameter2>" is null

     at com.aspose.cells.l34.a(Unknown Source)
     at com.aspose.cells.l34.a(Unknown Source)
     at com.aspose.cells.a3y.H(Unknown Source)
     at com.aspose.cells.a3y.c(Unknown Source)
     at com.aspose.cells.f06.a(Unknown Source)
     at com.aspose.cells.e2y.a(Unknown Source)
     at com.aspose.cells.h7c.l(Unknown Source)
     at com.aspose.cells.h7c.d(Unknown Source)
     at com.aspose.cells.h7c.e(Unknown Source)
     at com.aspose.cells.l34.a(Unknown Source)
     at com.aspose.cells.a6.a(Unknown Source)
     at com.aspose.cells.h7c.l(Unknown Source)
     at com.aspose.cells.h7c.d(Unknown Source)
     at com.aspose.cells.l34.b(Unknown Source)
     at com.aspose.cells.Name.getRange(Unknown Source)
     at com.aspose.cells.NameCollection.a(Unknown Source)
     at com.aspose.cells.WorksheetCollection.removeAt(Unknown Source)
     at com.aspose.cells.WorksheetCollection.removeAt(Unknown Source)
     at com.citi.aspose.excel.CellCalculationTest.Test(CellCalculationTest.java:61)
     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
     at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.base/java.lang.reflect.Method.invoke(Method.java:568)
     at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
     at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
     at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
     at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
     at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
     at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:258)
     at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
     at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
     at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
     at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
     at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
     at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
     at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
     at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
     at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
     at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
     at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
     at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
     at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
     at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
     at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
     at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
     at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:232)
     at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:55

We started getting this exception from 10th July 2024. Before this we never observed this behavior.
Also attached document here for which we got above exception.

please help.

document.zip (15.7 KB)

@forasposeissues
By testing with sample file and code on the latest version v24.7, the program can run normally without any exceptions. Please refer to the attachment. out_java.zip (5.4 KB)

The sample code as follows:

LoadOptions opt  = new LoadOptions();
opt.setMemorySetting(MemorySetting.MEMORY_PREFERENCE);
Workbook output = new Workbook(filePath + "Trial.xls",opt);
output.getWorksheets().removeAt("ChartData");
output.save(filePath + "out_java.xls");

Also, what version are you using for testing? You can use the following statement to check the version number.

System.out.println(CellsHelper.getVersion());

we are using version : 22.10.0

@forasposeissues
Sorry, if you keep using an older version (Aspose.Cells for Java v22.10.0), it won’t help you much. We couldn’t use the old version to evaluate the issue, nor could the old version include fixes or enhancements. All enhancements and fixes are based only on the latest API set.

We recommend you to kindly try using our latest version Aspose.Cells for Java v24.7. Please let us know if you still find any issues. We will check it shortly.