Public API Changes in Aspose.Cells 8.8.2
Contents
[
Hide
]
This document describes the changes to the Aspose.Cells API from version 8.8.1 to 8.8.2 that may be of interest to module/application developers. It includes not only new and updated public methods, added & removed classes etc., but also a description of any changes in the behavior behind the scenes in Aspose.Cells.
Added APIs
Automatically Update References while Deleting Blank Rows & Columns
Aspose.Cells for Java 8.8.2 has exposed the overloaded versions of the Cells.deleteBlankRows & Cells.deleteBlankColumns methods. 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 only 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.
For more details on this feature, please review the detailed article on Deleting Blank Rows & Columns with Updated References.
Following is the simple usage scenario.
Java
//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);