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

Free Support Forum - aspose.com

Workbook(inputstream) not working in Aspose 7.1.0

Hi,

In order to migrate from xls to xlsx we have updated the xls aspose version from 1.9.4.9 to 7.1.0.While exporting the contents to xlsx file in the appalication,an Null pointer exception is thrown in the following Line

Workbook template;

template = new Workbook("/com/tms/rmd/qpareport/QpaReportTemplate.xlsx");

I have attached error thrown on the console on generating the report.Kindly ,provide us the solution for this.

Note: Same error occurs when workbook.open() method is used.

Thanks and Regards,

Geetha

Hi,

Thanks for your posting and using Aspose.Cells for Java.

Please download and try the latest version:
Aspose.Cells
for Java v7.1.0.
4

You need to replace your old aspose jar with this one and update your class paths.

If the problem persists, then please provide us your source xls/xlsx file throwing exception, we will look into it and update you asap.

Hi,

This issue persist even after trying with latest aspose version u have sent.

Tha actual code we have used is:

template = new Workbook(this.getClass().getResourceAsStream("/com/xxx/rmd/qpareport/QpaReportTemplate.xlsx"));

Kindly let us know is there any other work around.

Thanks & Regards,

Geetha

Hi,

It appears to be a bug then.

Please provide us QpaReportTemplate.xlsx to look into this issue.

Hi ,

Please find the xlsx file attached.Kindly let us know ASAP.

Regards,

geetha

Hi,

I can find the NullPointerException while reading/opening your file by Aspose.Cells for Java.

I have logged a ticket with an id: CELLSJAVA-40131. We will look into it soon.

Thank you.

Hi,

It is to inform you that this issue has been fixed. We will provide you a fix soon.

Hi,

Could you plz say, in which version is the above fix available?

Thanks & regards,

Geetha

Hi,

We have not released the version yet, once we will release it, we will let you know.

Hi,

Hopefully the new version (v7.1.1) will be published in 1-2 days.

Thank you.

The issues you have found earlier (filed as CELLSJAVA-40131) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi,

Even in the new version(7.1.1),we are getting Null pointer exception.Kindly ensure will the fix work on passing input stream as parameter.i.e

Workbook wb=new workbook(input stream);

Following is the code we use:

template = new Workbook(this.getClass().getResourceAsStream("/com/tms/rmd/qpareport/QpaReportTemplate.xlsx"));

Hi,


Yes, sure we already tested, it works fine, here is the sample program (OS Win7, JDK1.5 Aspose.Cells for Java v7.1.1):

Sample code:
import java.io.;
import com.aspose.cells.;
import java.util.*;

public class Test {

public static void main(String[] args) throws IOException, Exception {

//This also works fine
//com.aspose.cells.Workbook template = new com.aspose.cells.Workbook (“QpaReportTemplate.xlsx”);

com.aspose.cells.Workbook template = new Workbook(Test.class.getResourceAsStream(“QpaReportTemplate.xlsx”));

template.save(“outQpaReportTemplate.xlsx”);

}

}
I have also attached the output file here.

Thank you.




Hi,

We are using JDK 1.4 ,will this fix work for JDk 1.4

Thanks & Regards,

Geetha

Hi,

I have attached Exception thrown while generating report .Kindly provide us with the solution as it is very critical for us.

Thanks & Regards,

Geetha

Hi,


We have tested the latest version v7.1.1 with JDK1.4 and still could not find the issue you mentioned. We tested on different machines too. Please make sure that you are using the new version (v7.1.1) and set all the jars into your classpath.

From our end, there is no issue at all, so we feel very strange if you are getting the issue.

Thank you.

Thanks Amjad… we are not getting Null pointer Exception now.

Hi,


Good to know that your issue is resolved.

Hi,

We are currently using trail version of aspose 7.1.1 ,We are getting out of memory error on generating the report.Is this problem is because of using trail version? I have attached attached the error obtained.

Thanks & regards,

Geetha

Hi,

Trial version does not have this limitation.

Please provide us your source xls/xlsx file and the source code replicating the problem.

We will look into it and help you asap.