Public API Changes in Aspose.Cells 8.0.2

Added TextDirection Property to Shape Class

The Shape class has exposed TextDirection property which can be used get or set the direction of the text flow for the Shape object. The TextDirection property can also be used to set the desired text direction for the comments in a spreadsheet as demonstrated below.

C#

 //Instantiate a new Workbook

var book = new Workbook();

//Get the first worksheet

var sheet = book.Worksheets[0];

//Add a comment to A1 cell

var comment = sheet.Comments[sheet.Comments.Add("A1")];

//Set its vertical alignment setting            

comment.CommentShape.TextVerticalAlignment  = TextAlignmentType.Center;

//Set its horizontal alignment setting

comment.CommentShape.TextHorizontalAlignment = TextAlignmentType.Right;

//Set the Text Direction - Right-to-Left

comment.CommentShape.TextDirection = TextDirectionType.RightToLeft;

//Set the Comment note

comment.Note = "This is my Comment Text. This is test";

//Save the Excel file

book.Save(myDir + "output.xlsx");

Added ConvertFormulasData Property to HTMLLoadOptions Class

ConvertFormulasData property has been added to the HTMLLoadOptions Class, in order to facilitate the developers to load Excel formulas from HTML files. The boolean ConvertFormulasData property indicates whether or not to convert the string to a formula when the string value starts with character ‘=’.

C#

 //Create an instance of HTMLLoadOptions

HTMLLoadOptions loadOptions = new HTMLLoadOptions();

//Set ConvertFormulasData to true

loadOptions.ConvertFormulasData = true;

//Create an instance of Workbook and load an HTML based spreadsheet 

//while passing the instance of HTMLLoadOptions

Workbook workbook = new Workbook(myDir + "spreadsheet.html", loadOptions);

Added ImageOptions Property to HtmlSaveOptions Class

ImageOptions property has been added to the HtmlSaveOptions Class. Exposing the ImageOptions property has enabled the developers to set the preferences for the images embedded in the HTML while exporting spreadsheets.

Obsoleted HtmlSaveOptions.ExportChartImageFormat Property

HtmlSaveOptions.ExportChartImageFormat has been marked obsolete starting from Aspose.Cells for .NET 8.0.2. It is advised to use HtmlSaveOptions.ImageOptions instead for image format settings while exporting spreadsheets to HTML format.