We are happy to share the release of the latest version of Aspose.Cells for Java v19.10 having a long-awaited feature of tracking the conversion progress of huge files. This is not the end of features in this release as it also supports custom data sorting for the specific area in PivotTable report and provides Workbook.ContentTypeProperties.Add method to add custom ContentTypeProperties to an excel file. Many other enhancements and bug resolutions are there in this release. You may get complete details of enhancements, new features and bugs resolution in the release notes. Just download the latest release and start testing the exciting features in Aspose.Cells for Java v19.10. Following is a brief overview of this new release.
Convert Excel to Image – Track Conversion Progress
Converting large Excel files to other formats is quite common, however, if it takes a long time, then you may want to provide some indication to the user about the progress of this conversion. Many users demanded this feature and we were working on its support. The wait is over as this new release has provided this feature where an interface IPageSavingCallback is provided to support tracking of the conversion. A custom class is to be written where the methods PageStartSaving and PageEndSaving provided by the IPageSavingCallback are to be implemented. Control is also provided for the conversion of each page in the document. In this case, you may skip some page or put a limit on the number of pages during the conversion. For the demonstration of this feature, you may download the source excel file and use it with the following sample code where conversion progress is shown by displaying messages on the console.
The following is the code for the TestTiffPageSavingCallback custom class.
Visit the following article for more information and sample files.
Customize Data Sorting in Pivot Table Report for a Specific Area
Pivot tables can provide rich information with little effort. Sometimes we may require to sort a pivot table on field values. For this purpose pivotField.setAutoSortField() function can be used where you have to provide the index of the item to be sorted. This will provide you with a lot of new representation of data for analysis and reporting. A sample code is provided here where usage os this function is demonstrated. Sample files are also provided in this article which can be used to for testing.
If you follow this example you will observe that an Excel file is loaded and three pivot tables are added into it. The pivot table at top is added such that no sorting is done in it. In the second pivot table sorting is down for row field values “SeaFood”. In the third table sorting the column field values ( “28/07/2000”) is demonstrated.
Using the Content-Type Properties
Custom properties can be added in an Excel file along with the default properties like tag, title and size etc. This can assist in searching specific files or grouping different type of files for a specific purpose. The option is also provided to mark some property as optional such that user is not enforced to provide value for some property. For adding a property you may use Workbook.ContentTypeProperties.Add and for setting a property optional set the value of ContentTypeProperty.IsNillable as true. In the following sample code, this new feature is demonstrated along with the image showing its effect.
Review the following article to get more details and sample files:
- An issue was reported about the performance of calculateFormula(). This issue is resolved by implementing more robust logics covering maximum scenarios.
- While converting Excel file to PDF, Pivot table data colouring and formatting was not rendering properly. This issue is resolved now.
- We have improved our product for conversion to PDF like keeping the similar layout as in the source Excel file, appropriate space between the widgets and exact size of images.
- A bug is removed like Cell.getStyle.getCustom was returning the wrong format for German locale but now the correct value is returned.
- Exception ArrayIndexOutOfBoundsException while loading the Excel file is removed.
So we are done for now and take your time to try all these new features. Use the following resources to get more information and sample code for testing this latest release.