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

Free Support Forum - aspose.com

Problems with latest version

Hi,

Am using aspose cells version 2.5.3.8 without any issues. Now am trying to use your latest version aspose.cells.7.0.3. But am getting lot of errors in this version. Hope you have changed lot of API’s.

Am getting error in the following code. Please let me know how to correct this.

1) com.aspose.cells.Workbook wb = new com.aspose.cells.Workbook();
wb.open(ByteArrayInputStream); // This method is not present

2) Could not find the following classes.

  • com.aspose.cells.Worksheets
  • com.aspose.cells.Charts
  • com.aspose.cells.NSeries
  • com.aspose.cells.ASeries
  • com.aspose.cells.Shapes
  • com.aspose.cells.CustomDocumentProperties;
3) Getting error while calling the below API’s
  • chart.getChartShape()
  • chartShp.setPositionXY(chartXPos, chartYPos);
  • chart.getCategoryAxis().getTitle().getFont().setBold(true);
  • chart.getValueAxis().getTitle().getFont().setBold(true);
  • picture.setPositionXY(imgXPos, imgYPos);
  • FileFormatType.EXCEL2003
Regards,
Santhosh

Hi,


Well, since the release of version v7.0.0: http://www.aspose.com/community/files/72/java-components/aspose.cells-for-java/entry325010.aspx
we have ported Java version from .NET, so now it matches with the .NET version regarding features and performance. We have to change the API model to match with .NET version. So, you might need to change your existing code segments accordingly.

Please refer to and you should browse the Aspose.Cells for Java API Reference for complete reference.
http://www.aspose.com/documentation/java-components/aspose.cells-for-java/aspose.cells-for-java-api-reference.html

Also, the Programmer’s Guide is updated based on the new APIs set, so, please check the documentation:
http://www.aspose.com/documentation/java-components/aspose.cells-for-java/programmers-guide.html


Now, let us come towards some of you issues on how you can fix.

1) Please use workbook constructor now, e.g
com.aspose.cells.Workbook wb = new com.aspose.cells.Workbook(stream);

2) Those older classes have been renamed to:
  • com.aspose.cells.WorksheetCollection
  • com.aspose.cells.ChartCollection
  • com.aspose.cells.SeriesCollection
  • com.aspose.cells.Series
  • com.aspose.cells.ShapeCollection
  • com.aspose.cells.CustomDocumentPropertyCollection
3) Use the following:
chart.getChartObject() --> to get ChartShape … Browse ChartShape API
.getTitle().getTextFont()–> to get Font object and now you may use your desired options.
Note: SetPositionXY method is not included in the new versions. It might be supported in later versions.
FileFormatType.EXCEL_97_2003


Hi,

Thank you for your detailed information. But, while saving a ods file to a xlsx file am getting the below exception.

java.lang.NoClassDefFoundError: org/codehaus/stax2/XMLStreamWriter2|
at com.aspose.cells.fX.a(Unknown Source)
at com.aspose.cells.fX.p(Unknown Source)
at com.aspose.cells.fX.a(Unknown Source)
at com.aspose.cells.fW.a(Unknown Source)
at com.aspose.cells.Workbook.a(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)
at com.aspose.cells.Workbook.save(Unknown Source)

Am using the below code.

com.aspose.cells.Workbook wb = new com.aspose.cells.Workbook(ByteArrayInputStream);
wb.save(filepath, com.aspose.cells.FileFormatType.XLSX);

Also can you give the SetPositionXY() method. Using that method we are setting the image x,y position.

Note : Refer this thread To find the row and column index
You have given that method for our requirement.

Regards,
Santhosh

Hi,

I used latest version/fix v7.0.3.2, we can render XLS/XLSX files from ODS file format. Curently there is no SetPositionXY() available in the latest versions/fix, we will include it soon. Also, the charts are not rendered b/w ODS to XLS/XLSX conversion.

Workbook m_workbook = new Workbook("input.ods");
m_workbook.save("ods.xlsx");

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

Thank you.

Hi,

For Shape.setPositionXY(), please use Shape.setX()/setY() now.

For the Exception of saving ods to XLSX, it seems you forgot to add those required libraries into your class path, such as stax2-api-3.0.2.jar, absence of it will cause this exception.

For reading chart from ods template file, we are working on this feature. Hopefully we can support to read most of charts from ods template file soon.

Please find the required libraries from this link:
Aspose.Cells for Java 7.0.3

Below are the names of all JARS for JDK 1.6

  1. aspose-cells-7.0.3.2.jar
  2. bcprov-jdk16-146.jar
  3. dom4j-1.6.1.jar
  4. stax2-api-3.0.2.jar
  5. woodstox-core-asl-4.1.1.jar

Hi,

In addition to the chart issue, GIF images are not animated in your latest version. It’s rendering like a normal JPEG image.

Regards,
Santhosh

Hi,


Ok, we have logged it as well.

Thank you.

Hi,

We have fixed this issue. Please download: Aspose.Cells for Java v7.0.3.6

We have supported the animated GIF again.

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


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