Apply Values Format Code to Chart Series and Interrupt Formula Calculations in the Workbook using Aspose.Cells for .NET 17.10

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedIn


Aspose.Cells for .NET logo
We are pleased to announce the release of Aspose.Cells for .NET v17.10. This release includes some useful features along with critical bug fixes that further improve the overall stability of the APIs. Please check the release notes in order to get an idea about what is new and what has been enhanced or fixed with this revision of Aspose.Cells for .NET. You can also install Aspose for .NET APIs directly from NuGet repository.

Set the Values Format Code of Chart Series

Aspose.Cells supports to set the values format code of chart series using the Series.ValuesFormatCode property. This property is useful for the series which are based on the range inside the worksheet, it also works well for the series created with array of values. The following sample code formats values with the formatting “$#,##0” using the Series.ValuesFormatCode property so the number, e.g “10000” will become “$10,000”.

//Load the source Excel file 
Workbook wb = new Workbook("Book1.xlsx");
 
//Access first worksheet
Worksheet worksheet = wb.Worksheets[0];
 
//Access first chart
Chart ch = worksheet.Charts[0];
 
//Add series using an array of values
ch.NSeries.Add("{10000, 20000, 30000, 40000}", true);
 
//Access the series and set its values format code
Series srs = ch.NSeries[0];
srs.ValuesFormatCode = "$#,##0";
 
//Save the output Excel file
wb.Save("out1.xlsx");

Please see the document/article with attachments and screenshots on how to set values format code of the chart series for your complete reference.

Utilize Sheet.SheetId property of OpenXml using Aspose.Cells

The property Sheet.SheetId is found inside the DocumentFormat.OpenXml.Spreadsheet namespace and is a part of OpenXml. Aspose.Cells provides the equivalent property named Worksheet.TabId. For more detail, please see this article.

Read and Write External Connection of XLSB file

Aspose.Cells already supports reading and writing external connections of an XLSX file format. We have added similar support for XLSB file format now. The code is same for both formats (XLSX and XLSB). For more detail, please see this article.

Interrupt or Cancel the Formula Calculation of Workbook

Aspose.Cells provides a mechanism to interrupt or cancel the formula calculation of workbook using the AbstractCalculationMonitor.Interrupt() method. This is useful when formula calculations in the workbook is taking too much time and you want to cancel its processing at certain point. For more detail, please see this article.

Specify how to cross string in output HTML using HtmlCrossType

When a cell contains text or string but it is larger than the width of the cell, then the string overflows if the next cell in next column is null or empty. When you save your Excel file into HTML, you can control this overflow for your needs by specifying the cross type using the HtmlCrossType enumeration. For more detail, please see this article.

Other Enhancements and Fixes

There are some other enhancements included in the new release for the users. A few of the worth mentioning features/enhancements are as follow.

  • Sheet to Image rendering – Text alignment for Asian fonts improved.
  • Handled/resolved “Input string was not in a correct format” – Exception on Pivot.CalculateData() method.
  • Handled an exception when converting XLSM file back to XLS file format.

In Aspose.Cells 17.10 we fixed many critical bugs and other issues. For example, issues around reading/writing MS Excel file formats, data sorting, rendering shapes and drawing objects, rendering and manipulating charts, inserting/deleting rows/columns, rendering images from Excel worksheets, rendering images files from charts and exporting Excel workbooks to PDF format have been resolved. The Aspose.Cells formula calculation engine is improved too.

Changes to the Public API

This version of Aspose.Cells for .NET has made some changes to the Public API. A few of the worth mentioning changes are as follow:

  • Added AbstractCalculationMonitor.Interrupt(string) method, it allows users to interrupt the progress of formula calculations.
  • Added HtmlCrossType.MSExport enum, it displays the string like MS Excel exporting HTML.
  • Added Worksheet.TabId property, it sets/gets the internal identifier for the sheet.
  • Added Seris.ValuesFormatCode property, it represents number format code of series values.

Aspose.Cells for .NET Resources

The resources, you may need to accomplish your tasks:


To keep up with our news, you can follow us on Twitter or follow our Facebook page.

Leave a Reply