We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Unable to instantiate Excel document

Hi,


I tried to instantiate workbook for attached excel file with the following code:

Workbook workbook = new Workbook(“AP-2338/IKEA Instructional Text_English Master File_v2_Full.xlsx”);

but I get com.aspose.cells.CellsException. Excel file and exception are attached to the post. Can You help me here?

Best regards,
Zeljko

Hi Zeljko,


Thank you for contacting Aspose Support.

We have evaluated your presented scenario with latest version of Aspose.Cells for Java 8.2.1, and are unable to observe any exception while loading your provided spreadsheet in an instance of Workbook. Please download and use the latest version (link shared above) on your end.

Please feel free to write back in case you need our further assistance.

Thank You,


I had problem with Aspose.Cells for Java 7.5.3, but with 8.2.1 it’s no longer an issue.

Thanks again,
Zeljko

Hi Zeljko,


It’s good to know that you are up & running again. Please feel free to write back in case you need our further assistance with Aspose APIs.

Hi,


I tested this file again with Aspose Cells for Java 8.2.2 and faced the same problem as from the first post on this topic. It’s funny that it’s not reproducing always but sometimes. Can You please check this for me, initiating it few times as I do?

Thanks, Zeljko

Hi Zeljko,


We have re-evaluated the case using the latest version of Aspose.Cells for Java 8.2.2, and we are unable to experience any exception while loading the provided spreadsheet in an instance of Workbook. Please check the following piece of code that initialized the Workbook for 1000 times without throwing any error.

Java

for (int i=0 ; i<=1000; i++)
{
Workbook book = new Workbook(“D:/temp/IKEA+Instructional+Text_English+Master+File_v2_Full.xlsx”);
}

Please note, we have used JDK 1.7.0_65 with Aspose.Cells 8.2.2 Jar from the JDK1.6 folder on Windows 7 Home Premium 64 bit. In case the problem persists on your end, please provide us your environment details such as Operation System version/architecture, JDK type/version so we may re-evaluate the case after simulating your environment on our side.

Hi Babar,


I am able to reproduce issue with provided code. Note that I am using Aspose Cells for Java 8.2.2 (JDK 1.6), on JDK 1.7.0_65, Ubuntu 14.04 LTS, 64-bit architecture.

Kind regards, Zeljko

Hi Zeljko,


Thank you for providing the environment details. Please spare us little time to prepare & test the case on Ubuntu 14 64bit. We will keep you posted with updates in this regard.

Hi Zeljko,


Thank you for your patience with us.

We have re-evaluated the case by simulating your environment on our end. Unfortunately we are still unable to experience the exception as stated in this thread. Please note, we have freshly setup the Ubuntu 14.04.1 Desktop 64 bit edition on a virtual machine, and first tested the case with OpenJDK (default) then removed the OpenJDK to manually install the Sun JDK 1.7.0_65. Both JDK types didn’t allow us to replicate the exception on our end with the same code snippet provided in our previous post. Is there anything else that you can tell us about your environment?

Please execute the following commands on the terminal and provide the output here. Thanks.

  • java -version
  • uname -a
  • cat /etc/*release

Hi Babar,


well, maybe it’s important to note that I am testing this with Eclipse (version Kepler Service Release 2, Build id: 20140224-0627) through JUnit test (version 4.8.2). Test sometimes passes, and sometimes just throws mentioned exception.
Here is the output that You requested:
zpredojevic@ubuntu:~$ java -version
java version "1.7.0_65"
Java™ SE Runtime Environment (build 1.7.0_65-b17)
Java HotSpot™ 64-Bit Server VM (build 24.65-b04, mixed mode)
zpredojevic@ubuntu:~$ uname -a
Linux u-zpredojevic 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
zpredojevic@ubuntu:~$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"
NAME="Ubuntu"
VERSION="14.04.1 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.1 LTS"
VERSION_ID="14.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
zpredojevic@ubuntu:~$
If there is anything else I can do to help solving this please let me know.

Zeljko

Hi Zeljko,


Thank you for providing the environment details. I have the same environment on my end but I am using NetBeans IDE, and I don’t think that changing the IDE to Eclipse will make any difference. However, I will surely give it a shot.

In the meanwhile, could you please test the latest revision of Aspose.Cells for Java 8.2.2.1 on your end to see if you can still replicate the exception.

Hi Babar,


I’ve tested the latest version downloaded from link You provided in previous post and I was still able to reproduce the issue.

Zeljko

Hi Zeljko,


We are sorry to know that the latest version didn’t help. Unfortunately, I am unable to replicate the said exception so far, however, I have logged an investigative ticket in our bug tracking system so that the core development team could provide an insight of the error “Unknown image format:input object was not set” in perspective of your provided sample. The ticket Id for your future reference is CELLSJAVA-41067. We will post here as soon as we receive any updates from the core team.

Hi Babar,


thank You for Your effort, let’s hope that developers will clear this out.

Best regards,
Zeljko

Hi Zeljko,


We have received a response from the core team, they were also unable to replicate the said problem on Ubuntu JDK 1.7. We require the complete stacktrace of the exception with latest version of Aspose.Cells for Java 8.2.2.1 in order to further investigate the matter on our end.

Hi Babar,


here You go:
com.aspose.cells.CellsException: Unknown image format
at com.aspose.cells.zdk.a(Unknown Source)
at com.aspose.cells.zaco.a(Unknown Source)
at com.aspose.cells.zacy.g(Unknown Source)
at com.aspose.cells.zacy.b(Unknown Source)
at com.aspose.cells.zacy.u(Unknown Source)
at com.aspose.cells.zacy.a(Unknown Source)
at com.aspose.cells.zacx.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.(Unknown Source)
at ....*.*Test.test(*Test.java:111)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.IllegalArgumentException: input object was not set
at com.aspose.ms.imagecodecs.gif.b.do(Unknown Source)
at com.aspose.ms.imagecodecs.gif.b.read(Unknown Source)
at javax.imageio.ImageIO.read(ImageIO.java:1448)
at com.aspose.cells.b.a.b.za.(Unknown Source)
at com.aspose.cells.b.a.b.zj.a(Unknown Source)
at com.aspose.cells.zbv.a(Unknown Source)
at com.aspose.cells.zbv.(Unknown Source)
… 33 more

This is stacktrace from *Test that uses Aspose Cells for Java 8.2.2.1

Thanks, Zeljko

Hi Zeljko,


Thank you for providing the required details. We have forwarded the information to the core team, and currently waiting for their analysis results. As soon as we get more updates in this regard, we will post here for your kind reference.

Hi Zeljko,

Thanks for using Aspose.Cells for Java.

We have fixed this issue.

  • CELLSJAVA-41067 - Random CellsException: Unknown image format, at Workbook ctor

Please download and try this fix: Aspose.Cells for Java v8.2.2.2 and let us know your feedback.

Hi,


I’d like to confirm that it is no longer an issue, thank You so much!

Best regards,
Zeljko

Hi,


Thanks for your feedback.

Good to know that your issue is resolved now. Feel free to contact us any time if you need further help or have some other issue or queries, we will be happy to assist you soon.

Thank you