Public API Changes in Aspose.Cells 8.8.2

Added APIs

Update References Automatically while Deleting Blank Rows & Columns

Aspose.Cells for .NET 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.

Following is the simple usage scenario.

C#

 //Create an instance of Workbook & load an existing spreadsheet

var book = new Workbook(dir + "sample.xlsx");

//Access worksheet from which blank rows/columns have to be deleted

var sheet = book.Worksheets[0];

//Access cells of the desired worksheet

var cells = sheet.Cells;

//Create an instance of DeleteOptions class

DeleteOptions options = new DeleteOptions();

//Set UpdateReference property to true;

options.UpdateReference = true;

//Delete all blank rows and columns

cells.DeleteBlankColumns(options);

cells.DeleteBlankRows(options);