Avoid Rendering Blank Page in Output PDF when Excel File is Empty – Aspose.Cells for .NET 18.4

Aspose.Cells for .NET logo

We are pleased to announce the release of Aspose.Cells for .NET v18.4. Please check the document on how to install Aspose for .NET APIs directly from the NuGet repository. In this release, we have added some worthy features and other enhancements for the users. 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.

Avoid Blank Page in Output PDF when Worksheet is Empty

When the Excel file is empty and the user saves it to PDF using Aspose.Cells, it renders the blank page in output PDF. Sometimes, this default behavior is undesirable. Aspose.Cells provides the PdfSaveOptions.OutputBlankPageWhenNothingToPrint property to deal with this issue. If you will set it as false, then CellsException will occur whenever there is nothing to print in the output PDF.

Please see the following article for more detail on this topic for your reference.

Find Type of X and Y Values of Points in Chart Series

Sometimes, you want to know the type of X and Y values of chart points in a series. Aspose.Cells provides ChartPoint.XValueType and ChartPoint.YValueType properties that can be used for this purpose. Please note, you will have to call Chart.Calculate() method before you could use these properties effectively. Please see the following article for more detail on this topic for your reference:

Get HTML5 String from Cell

Aspose.Cells returns the HTML string of the cell using the string GetHtmlString (bool html5) method. If you pass “false” as parameter, it will return you Normal HTML but if you pass “true” as parameter, it will return Html5 string. Please see the following article for more detail on this topic for your reference:

Hiding Overlaid Content with CrossHideRight while Saving to HTML

When you save your MS Excel file to HTML, you can specify different cross types for cell strings. By default, Aspose.Cells generates HTML as per Microsoft Excel but when you change cross-type to CrossHideRight then it hides all the strings from the right side of the cell which are overlaid or overlapping with cell string. Please see the following article for more detail on this topic for your reference:

Specify the Language of the Excel File using Built-In Document Properties

You can change the Language of MS Excel file by right-clicking the file and then selecting Properties > Details and then editing the Language field. Please use BuiltInDocumentPropertyCollection.Language property to change it programmatically using Aspose.Cells APIs. Please see the following article for more detail on this topic for your reference:

Create Chart PDF with Desired Page Size

You can create a chart’s PDF file with your desired page size using Aspose.Cells and specify how you want to align the chart inside the page like top, bottom, center, left, right, etc. Besides this, the output chart can be created in stream or on disk. Please see the following article for more detail on this topic for your reference:

Get All Hidden Rows Indices after Refreshing AutoFilter

When you apply the auto filter on worksheet cells, then some of the rows get hidden automatically. But it might be the case that some of the rows are already hidden manually by MS Excel end user and they are not hidden by auto filter feature. It, therefore, makes difficult to know which of the rows are hidden by an auto filter and which rows are hidden manually by MS Excel end user. Aspose.Cells deals with this problem using the int[] AutoFilter.Refresh(bool hideRows) method. This method returns the row indices of all the rows that are hidden by an auto filter and not by the manual way in MS Excel. Please see the following article for more detail on this topic for your reference:

Rotate Text with Shape inside the Worksheet

You can add text inside any shape using Microsoft Excel. If you add shape using the older Microsoft Excel 2003, then the text will not rotate with shape. But if you add shape using newer versions of Microsoft Excel e.g. 2007, 2010, 2013 or 2016, etc. then the text will be rotated with shape. You can control if the text should rotate with the shape or not using the ShapeTextAlignment.RotateTextWithShape property. Please see the following article for more detail on this topic for your reference:

Read/Write TSV (Tab-Separated Values) Files 

Tab-Separated Values (TSV) file (similar to Tab Delimited) contains spreadsheet data but without formattings. Aspose.Cells does support to read and write TSV file format type, it includes relevant member (TSV) in both LoadFormat and SaveFormat Enumerations. See the following sample code for your reference.

Please see the following article for more detail on this topic for your reference.

Aspose.Cells for .NET Resources

The resources, you may need to accomplish your tasks: