Aspose.Cells for Java

We are pleased to announce the release of Aspose.Cells for Java 8.8.2. This release includes some new features, enhancements and bug fixes that further improve the overall stability and usability of the API. Please check the release notes in order to get an idea about what is new and what has been fixed with this revision of Aspose.Cells for Java. If you are planning to upgrade the API from any previous version, we strongly suggest you check the Public API Changes section to know what has been changed since your current revision of the API.

While you are downloading the latest build, here is a look at the biggest features in this release.

Deleting Blank Rows & Columns with Updated References

As per default behaviour, Aspose.Cells APIs delete the blank rows & columns without updating the cell references that may have been effected from the delete process. This could lead to undesired results in certain cases, especially when spreadsheet contains formulas or charts.

Aspose.Cells APIs have tried to overcome the aforementioned situation by exposing the overloaded versions of the Cells.deleteBlankRows & Cells.deleteBlankColumns methods with the release of Aspose.Cells for Java 8.8.2. The new methods can accept an instance of DeleteOptions class and can be used to overcome the situations that could arise due to the broken references in formulas, chart series data and so on. The DeleteOptions class currently has one member, a Boolean type property by the name UpdateReference. If the said property is set to true and the instance of DeleteOptions class is passed to the Cells.deleteBlankRows & Cells.deleteBlankColumns methods, the API will internally adjust the formula references (if any) to accommodate the changes.

Below provided code snippet demonstrates the simple usage scenario of newly exposed overloads. If you wish to get more understanding where these methods should be used, please check the detailed article on updating cell references while deleting blank rows & columns.

//Create an instance of Workbook & load an existing spreadsheet
Workbook book = new Workbook(dir + "sample.xlsx");

//Access worksheet from which blank rows/columns have to be deleted
Worksheet sheet = book.getWorksheets().get(0);

//Access cells of the desired worksheet
Cells cells = sheet.getCells();

//Create an instance of DeleteOptions class
DeleteOptions options = new DeleteOptions();
//Set UpdateReference property to true;
options.setUpdateReference(true);

//Delete all blank rows and columns
cells.deleteBlankColumns(options);
cells.deleteBlankRows(options);

Other Enhancements & Improvements

The most notable enhancements in this release are as follow:

Aspose.Cells for Java Resources

The resources, you may need to accomplish your tasks: