Aspose.Cells for .NET logo

We are pleased to announce our next version of Aspose.Cells for .NET v16.11.0. The new release includes some features and other important enhancements with some critical bug fixes. Please see the release notes in order to know what is new and what has been changed/fixed with this version of Aspose.Cells for .NET. If you are planning to upgrade the Aspose.Cells for .NET API to the latest revision, we would strongly suggest you to check the complete Public API Changes section to know what APIs are changed so far. We have highlighted some valuable features and other enhancements here.

Create Custom Subtotal Labels

Aspose.Cells for .NET 16.11.0 has added the support for the creation of custom subtotal labels allowing the application developers to customize the labels according to the region or personal preferences. In order to provide this feature, the latest version of the Aspose.Cells for .NET has exposed the GlobalizationSettings class offering the following 2 methods which can be overridden in a custom class to get desired labels for the Subtotals.

  • GlobalizationSettings.GetTotalName: Gets the total name of the function.
  • GlobalizationSettings.GetGrandTotalName: Gets the grand total name of the function.

The GlobalizationSettings class can be used to customize the Subtotal labels by overriding the GlobalizationSettings.GetTotalName & GlobalizationSettings.GetGrandTotalName methods as demonstrated below.

In order to inject custom labels, it is required to assign the WorkbookSettings.GlobalizationSettings property to an instance of the CustomSettings class defined above, before adding the Subtotals to the worksheet.

Render Other Custom Label for Pie Chart

The GlobalizationSettings class also offers the GetOtherName method which is useful to give the “Other” label of Pie charts a custom value. The following snippet defines a custom class and overrides the GetOtherName method to get a custom label based on the system’s regional (culture) settings.

The following snippet loads an existing spreadsheet containing a Pie chart and renders the chart to the image while utilizing the CustomSettings class created above.

Please check the detailed article on Introduction to GlobalizationSettings Class if you want to get more in-depth knowledge of the aforementioned usage scenarios.

Create Style Object with CellsFactory Class

Aspose.Cells 16.11.0 has exposed the CellsFactory class which currently has one method, that is; CreateStyle. The CellsFactory.CreateStyle method can be used to create an instance of Style class without adding it to the pool of workbook styles.

Here is a simple usage scenario of newly exposed APIs to create a simple Style object, whereas a detailed article can be viewed on Creating Style Object with CellsFactory Class.

Aspose.Cells.GridWeb for .NET 16.11.0 has exposed GetHyperlink method to the GridHyperlinkCollection class that allows getting the instance of GridHyperlink by either passing an instance GridCell or a pair of integers corresponding to the row-column indices.

Here is a simple usage scenario of GridHyperlinkCollection.GetHyperlink method, whereas a detailed article can be viewed on Access GridHyperlink from a GridCell Object.

Other Enhancements and Fixes

Aspose.Cells for .NET 16.11.0 has fixed a few critical bugs as well as enhanced its core for more stability. A few of the worth mentioning enhancements are as follow.

Furthermore, in this release, we have fixed several other issues. For example, issues around reading/writing MS Excel Excel file formats, manipulating and rendering shapes, manipulating PivotTables, copying ranges in the worksheet, rendering to HTML file format, rendering images from Excel worksheets, rendering images files from charts and exporting Excel workbooks to PDF format have been resolved.

Changes to the Public API

This revision of Aspose.Cells for .NET has made some changes to the Public API. A few of the worth mentioning changes are as follow whereas details can be viewed from the Migration Manual.

  • Constructor for the Style class has been marked obsoleted whereas an alternative approach has been exposed that uses the CellsFactory class.
  • The Cell.GetConditionalStyle method has been completely removed from the public APIs because it was obsoleted some time back and an alternative approach has already been exposed by using Cell.GetConditionalFormattingResult method.
  • The Cells.GetMaxDataRowInColumn(int column) method has been removed. It is advised to use the Cells.GetLastDataRow(int) method as an alternative.
  • The PageSetup.Draft property has been removed. It is advised to use the PageSetup.PrintDraft property instead.
  • The AutoFilter.FilterColumnCollection property has been removed while providing the AutoFilter.FilterColumns property to achieve the same goal.

Aspose.Cells for .NET Resources

The resources, you may need to accomplish your tasks: