We are pleased to announce the release of Aspose.Cells for .NET v17.7. This release includes some useful features and other enhancements along with some 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 fixed with this revision of Aspose.Cells for .NET. You can also install Aspose for .NET APIs directly from NuGet repository.
Set DefaultFont property of PdfSaveOptions and ImageOrPrintOptions
When saving to PDF or image, Aspose.Cells will first try to set Workbook’s default font (i.e., Workbook.DefaultStyle.Font). If workbook’s default font still cannot show/render text properly, then Aspose.Cells will try to render with font mentioned against DefaultFont attribute in PdfSaveOptions/ImageOrPrintOptions.
Aspose.Cells now provides a Boolean property named CheckWorkbookDefaultFont in PdfSaveOptions/ImageOrPrintOptions. You can set it to false to let the DefaultFont setting in PdfSaveOptions/ImageOrPrintOptions have priority.
//Open an Excel file. Workbook workbook = new Workbook("Book1.xlsx"); //Rendering to PNG file format while setting the CheckWorkbookDefaultFont attribute to false. //So, "Times New Roman" font would be used for any missing (not installed) font in the workbook. ImageOrPrintOptions imgOpt = new ImageOrPrintOptions(); imgOpt.ImageFormat = ImageFormat.Png; imgOpt.CheckWorkbookDefaultFont = false; imgOpt.DefaultFont = "Times New Roman"; SheetRender sr = new SheetRender(workbook.Worksheets, imgOpt); sr.ToImage(0, "out1_imagePNG.png"); //Rendering to PDF file format while setting the CheckWorkbookDefaultFont attribute to false. //So, "Times New Roman" font would be used for any missing (not installed) font in the workbook. PdfSaveOptions saveOptions = new PdfSaveOptions(); saveOptions.DefaultFont = "Times New Roman"; saveOptions.CheckWorkbookDefaultFont = false; workbook.Save("out1_pdf.pdf", saveOptions);
Please see this article that explains how to set default font while rendering to PDF and image format.
Read Numbers Spreadsheet Developed by Apple Inc.
Numbers is a spreadsheet application developed by Apple Inc. Aspose.Cells can read Numbers spreadsheet but it does not support writing to it. It can read Numbers spreadsheet’s Data, Style and Formulas. For more detail, please see this article.
Apply Advanced Filter of Microsoft Excel to Display Records Meeting Complex Criteria
Aspose.Cells allows you to apply the Advanced Filter using the Worksheet.AdvancedFilter() method. Just like Microsoft Excel, it accepts the following parameters:
isFilter – Indicates whether filtering the list in place.
listRange – The list range.
criteriaRange – The criteria range.
copyTo – The range where copying data to.
uniqueRecordOnly – Only displaying or copying unique rows.
See the following document/article for your reference.
Implement Errors and Boolean Value in Russian or Any Other Language.
If you are using Microsoft Excel in Russian Locale/Language or any other Locale/Language, it will display errors and Boolean values according to that Locale or Language. You can achieve the similar behavior of Microsoft Excel using Aspose.Cells APIs with Workbook.Settings.GlobalizationSettings property. You will have to override the following methods of GlobalizationSettings class:
For more detail, please see this article.
Resize GridWeb in the browser window
Load and render PivotTable into Aspose.Cells.GridDesktop
If your Excel file has a Pivot Table, Aspose.Cells.GridDesktop will be able to load and render the PivotTable fine by importing the file into it. Moreover, you will be able to interact the Pivot Table in GUI and manipulate it as you do it in MS Excel. The screenshot shows the rendering of Pivot Table in GridDesktop.
For more detail, please see this article.
Other Enhancements and Fixes
There are numerous other important enhancements included in the new release for the users. A few of the worth mentioning features/enhancements are as follow.
- Determine if Paper Size of Worksheet is Automatic.
- Customize Row and Column Captions of Aspose.Cells.GridDesktop Worksheet.
- Find GridDesktop Version at Runtime.
- Handled “System.ArgumentOutOfRangeException” when loading an MHTML file.
- Handled NullReferenceException when saving Excel workbook to HTML file format.
Aspose.Cells 17.7 has enhanced its core for more stability as well as fixed many critical bugs. In this release, we have fixed several other issues. For example, issues around reading/writing MS Excel file formats, rendering shapes and drawing objects, resizing ListObject/Table, rendering and manipulating charts, manipulating PivotTables, rendering HTML to Excel and vice versa, 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 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 GlobalizationSettings.GetBooleanValueString()/GetErrorValueString() methods that specifies custom display string value for the cell.
- Added PdfSaveOptions/ImageOrPrintOptions.CheckWorkbookDefaultFont property that indicates whether to try to use workbook’s default font at first to show the characters whose font is not set correctly.
- Added FileFormatType.Numbers, LoadFormat.Numbers and SaveFormat.Numbers enum which represents the Numbers spreadsheet file format by Apple Inc.
- Added GridWebInstance.resize() function that makes the Aspsoe.Cells.GridWeb control compatible with current browser window’s size.
Aspose.Cells for .NET Resources
The resources, you may need to accomplish your tasks:
- Home of Aspose.Cells for .NET API.
- Aspose.Cells for .NET Download Section.
- Aspose.Cells for .NET Documentation – up-to-date documentation containing Programmer’s Guide, Knowledge Base and much more.
- Aspose.Cells for .NET API Reference Guide – detailing the publicly exposed classes, methods, properties, constants & interfaces.
- Aspose.Cells Product Family Forum – post your technical questions and queries, or any other problem you are facing while working with Aspose.Cells APIs.
- Aspose.Cells for .NET Examples – we have published our code examples on the social coding website GitHub.com. Anyone could explore the code examples for learning purposes.