Auto populate Smart Markers data to other worksheets and export worksheet CSS separately in the output HTML using Aspose.Cells for .NET 17.12

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.12. There are quite a few useful enhancements included for HTML and PDF renderings. Moreover, you can now auto populate data against Smart Markers to split to other sheets. 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.

Auto populate Smart Markers data to other worksheets if data is too large to handle in a single worksheet

While using Smart Markers feature, you might need to auto populate data to other worksheets when it too large to be handled in a single worksheet. For example, your data source has 1500000 records. Since the data is large, so you can paste your desired data set in the first worksheet while the rest of the records to next worksheet. The following sample code uses a data source which has 21 records in total. We will show only 15 records in the first worksheet, then the rest of the records will be automatically moved to second worksheet. Please note, the second worksheet should also have the same smart marker tag (as first) and you must call WorkbookDesigner.Process(sheetIndex, isPreserved) method for both sheets.

//Create employees data table
DataTable dt = new DataTable("Employees");
dt.Columns.Add("EmployeeID", typeof(int));

//Add rows inside the data table

//Create data reader from data table
DataTableReader dtReader = dt.CreateDataReader();

//Create empty workbook
Workbook wb = new Workbook();

//Access first worksheet and add smart marker in cell A1
Worksheet ws = wb.Worksheets[0];

//Add second worksheet and add smart marker in cell A1
ws = wb.Worksheets[1];

//Create workbook designer
WorkbookDesigner wd = new WorkbookDesigner(wb);

//Set data source with data reader
wd.SetDataSource("Employees", dtReader, 15);

//Process smart marker tags in first and second worksheet
wd.Process(0, false);
wd.Process(1, false);

//Save the workbook

Please see the documents/articles with attachment(s) on how to auto populate Smart Markers data to other worksheets if data is too large.

Export worksheet CSS separately in output HTML

Aspose.Cells provides the feature to export worksheet CSS separately when you convert your Excel file to HTML file format. Please use HtmlSaveOptions.ExportWorksheetCSSSeparately property for this purpose and set it to true while saving Excel file to HTML format. For more detail on the feature, please see this article/document for your reference.

Implement Cell.FormulaLocal similar to Excel VBA Range.FormulaLocal

Microsoft Excel formulas may have different names in different locales/regions or languages. For example, SUM function is called SUMME in German. Aspose.Cells cannot work with non-English function names. In Microsoft Excel VBA, there is Range.FormulaLocal property that returns the name of the function as per its language or region. Aspose.Cells also provides Cell.FormulaLocal property for this purpose. However, this property will only work when you will implement GlobalizationSettings.GetLocalFunctionName(string standardName) method. For more detail, please see this article.

Prefix Table elements Styles with HtmlSaveOptions.TableCssId property

Aspose.Cells allows you to prefix table elements styles with HtmlSaveOptions.TableCssId property. For more detail, please see this article.

Render Office Add-Ins while converting Excel to Pdf

Aspose.Cells now supports to render MS Office Add-ins (in Excel files) in the output PDF. You do not need to use any special method or property to render Office Add-Ins in the output PDF. For more detail, please see this article.

Set the Shape type of Data labels of chart

You can change the shape type of data labels of the chart using the DataLabels.ShapeType property. It takes the value of DataLabelShapeType enumeration and changes the shape type of data labels accordingly. For more detail, please see this article.

Other Enhancements and Fixes

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

In Aspose.Cells 17.12 we fixed several important bugs and other issues. For example, issues around reading/writing MS Excel file formats, copying range of cells, displaying worksheet in right to left, rendering Excel to HTML and vice versa, rendering shapes and drawing objects, rendering and manipulating charts, manipulating and refreshing PivotTables, 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 also reviewed and enhanced.

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 HtmlSaveOptions.TableCssId property,  it gets and sets the prefix of the type css name.
  • Added Cell.FormulaLocal property, it gets the local formatted formula which may vary according to different locale settings for separators, built in Names, function names, etc.
  • Added GlobalizationSettings.GetLocalFunctionName(string standardName) method, it gets the locale dependent function name according to given standard function name.
  • Added HtmlSaveOptions.ExportWorksheetCSSSeparately property, it indicates whether exporting the worksheet css separately. The default value is false.
  • Added WorksheetCollection.RevisionLogs property, RevisionLogCollection class and Revisions.RevisionLog class, it gets setting of revision log.

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