Render your desired range only to HTML and filter VBA Projects in the workbook using Aspose.Cells for .NET 18.12

Share on FacebookTweet about this on TwitterShare on LinkedIn

Aspose.Cells for .NET logoWe are pleased to announce the release of Aspose.Cells for .NET v18.12, the MS Excel file formats API that provides the ability to create, manipulate, convert or render MS Excel spreadsheets, and more importantly – is fully documented. Please check the document on how to install Aspose for .NET APIs directly from NuGet repository. We have added a few important features and other enhancements while keeping the product more stable and feature rich API. We also included important bug fixes as a part of this release. We are moving ahead to achieve our goals in the industry by providing state of the art products by addressing each and every concern of our customers. This is all possible due to continuous support and feedback by the developers community. Moreover, fixing bugs and issues leads us to new enhancements and features which increases our customer base.

Please check the release notes which cover all the new features, enhancements and list of bugs which are resolved in this new version. New features are always introduced for enhancing this product which helps us to compete the ever growing software industry. Exceptions handling empowers the developers to keep control of the applications and assist users in a better way to continue using the application without any interruption. You will get an idea about what is new and what has been enhanced or fixed with this revision of Aspose.Cells for .NET


Export single sheet workbook to HTML

Workbook can have multiple sheets which are rendered as multiple tab pages when converted to HTML using MS Excel. Similarly if a workbook contains single sheet, it shows one tab page when converted to HTML using Excel. This conversion was working fine for multiple sheets while using Aspose.Cells. However for single sheet workbook, there was no tab page and only HTML file was created without creating the separate folder containing CSS. Now Aspose.Cells has enhanced its library to create similar output for single sheet workbooks as compared to output created by Excel.

For a working example refer to the following article:

Load workbook efficiently without loading VBA project

In complex Excel files (XLSM/XSLB) there can be large amount of macros which can be very long. Many times there is a need to load the workbooks without loading these VBA projects like just extracting the sheet names from loaded workbook. In this case we need a filter which can load/skip VBA projects. This time Aspose.Cells has introduced a filter option LoadDataFilterOptions.VBA which can be used for this purpose.

For a working example refer to the following article:

Replacing tags in Textbox within a worksheet

Textbox is a common control which can be used in a worksheet. This is not necessary that text in the textbox is fixed. It may have tags which can be replaced with some text at runtime. It helps users to configure the controls as per the data on the sheet or from some other source. Worksheet.replace can be used for this purpose and textbox can be set with the desired text.

For a working example refer to the following article:

Export print area range to HTML

We can convert worksheet to HTML but rendering entire sheet at once may not be required always. You may require just a selected area of the sheet to be rendered to HTML. Worksheets contain page setup where print area can be set. There was a need that only  this print area shall be rendered to HTML if required. HtmlSaveOptions is extended by adding a new enumerator ExportPrintAreaOnly which enables users to render only print area in the HTML.

For a working example refer to the following article:

Identification of validation as dropdown

A worksheet can have different types of validations including dropdown. Users might want to detect the type of validation and take some decisions  based on this information. Validation object can be obtained from a cell and a new function is defined for this validation which returns if validation is a dropdown or not. Use the function Validation.getInCellDropDown() which returns a Boolean value i.e. true or false.

For a working example refer to the following article:

Other Enhancements and Fixes

There are some other enhancements included and a few exceptions handled in the new release for the users. A few of the worth mentioning features and other improvements are as follows:

  • Creating and customizing charts
  • Tracked Changes lost during conversion from XLSB to XLSM and XLS to XLSM
  • Text moved a little bit after ungrouping the shape when saving an XLS to XLSX
  • Optimization for memory performance: release original stream after loading Workbook
  • Handled exception “NullReferenceException” when loading an XLSB file format
  • Handled ArgumentException on loading a workbook

In Aspose.Cells 18.12, we fixed several important bugs and other issues. For example, issues around reading/writing MS Excel file formats, reading/writing HTML files, protecting ODS files, setting data validations, manipulating rows and columns, manipulating smart art shapes, refreshing and calculating pivot tables, rendering and manipulating charts and shapes, rendering images from Excel worksheets, rendering images files from charts and exporting Excel workbooks to PDF format have been resolved in the release. 

Changes to the Public API

The following is a list of any changes made to the public API such as added, renamed, removed or deprecated members as well as any non-backward compatible change made to Aspose.Cells for .NET:

  • Adds HtmlSaveOptions.ExportSingleTab property, indicates whether exporting the single tab when the file only has one worksheet in it. The default value is false.
  • Adds HtmlSaveOptions.ExportPrintAreaOnly property, indicates if only exporting the print area to html file. The default value is false.

  • Deletes obsoleted Workbook.Initialize() method, use Workbook constructor instead.

  • Deletes obsoleted Workbook.Styles property, use Workbook.CreateStyle() to create and manipulate style for workbook instead of StyleCollection.Add(); Use Workbook.GetNamedStyle(string) to get named style instead of StyleCollection.

  • Deletes obsoleted Workbook.CheckWriteProtectedPassword() method, use WorkbookSettings.WriteProtection.ValidatePassword method instead.

  • Deletes obsoleted Workbook.CheckWriteProtectedPassword() method, use WorkbookSettings.WriteProtection.ValidatePassword method instead.

  • Adds LoadDataFilterOptions.VBA enum, the option used to ignore VBA projects while loading template file.

  • Adds Style.InvariantCustom property, gets the culture-independent pattern string for number format (including the pattern string for built-in number).

  • Adds FindOptions.ValueTypeSensitive property, indicates whether searched cell value type should be same with the searched key.

  • Obsoletes FindOptions.SearchNext property, use FindOptions.SearchBackward property instead, true value for this new property corresponds to false of SearchNext.

  • Deletes obsoleted Cells.ImportGridView(System.Web.UI.WebControls.GridView,int ,int , bool ,bool ,bool ) method, use Cells.ImportGridView (System.Web.UI.WebControls.GridView gridView,int firstRow,int firstColumn,ImportTableOptions options) method. instead.

  • Deletes obsoleted Cells.Start property, use Cells.FirstCell property instead.

  • Deletes obsoleted Cells.End property, use Cells.LastCell property instead.

  • Deletes Cells[int] property, use Cells.GetEnumerator() method to iterate all cells in this worksheet instead.

  • Deletes obsoleted Cells.ImportDataColumn() methods, use Cells.ImportData (DataTable,int,int,ImportTableOptions) method instead.

  • Deletes obsoleted Cells.ImportDataReader() methods, use Cells.ImportData (IDataReader, int, int,ImportTableOptions) method instead.

  • Deletes obsoleted Shape.Rotation property, use Shape.RotationAngle property instead.

  • Deletes obsoleted Validation.AreaList property, use Validation.Areas property instead.

  • Deletes obsoleted Style constructor, use CellsFactory.CreateStyle() or Workbook.CreateStyle() method instead.

  • Deletes obsoleted Shape.IsPrinted property, use Shape.IsPrintable property instead.

  • Deletes obsoleted PivotItem.Move(int) method, using PivotItem.Move(int , bool ) method instead.

  • Deletes obsoleted  Cells.ExportDataTable(int, int, int, int,bool, bool),Cells.ExportDataTable(int, int, int, int,object[]), Cells.ExportDataTable(int, int, int, int,bool), 
    Cells.ExportDataTable(DataTable, int, int[],int, bool) and Cells.ExportDataTable(DataTable,int, int, int, bool, bool) methods, 
    use ExportDataTable(firstRow,firstColumn, totalRows, totalColumns,ExportTableOptions) method instead.

Aspose.Cells for .NET Resources

The resources, you may need to accomplish your tasks: