Output Empty Sheet as Blank Page, Export Cell Comments and Disable Downlevel Revealed Comments in HTML and Add Digital Signatures

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

Aspose.Cells for JavaWe are pleased to announce the release of Aspose.Cells for Java 17.8. This release includes many new features and enhancements along with some critical bug fixes that further improve the overall stability of the APIs. We also recommend our clients to use the powerful Aspose for Java APIs directly in their Maven Projects with simple configurations. 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 Java. Here is a look at the major features in this release.

Output Blank Page when there is Nothing to Print

If the sheet is empty, then Aspose.Cells will not print anything when you export worksheet to image. You can change this behavior by using the ImageOrPrintOptions.OutputBlankPageWhenNothingToPrint property. When you will set it true, it will print the blank page.

// Create workbook
Workbook wb = new Workbook();
 
// Access first worksheet - it is empty sheet
Worksheet ws = wb.getWorksheets().get(0);
 
// Specify image or print options
// Since the sheet is blank, we will set OutputBlankPageWhenNothingToPrint to true
// So that empty page gets printed
ImageOrPrintOptions opts = new ImageOrPrintOptions();
opts.setImageFormat(ImageFormat.getPng());
opts.setOutputBlankPageWhenNothingToPrint(true);
 
// Render empty sheet to png image
SheetRender sr = new SheetRender(ws, opts);
sr.toImage(0, dirPath + "OutputBlankPageWhenNothingToPrint.png");

Export Comments while Saving Excel file to Html

When you save your Excel file into HTML, comments are not exported. However, Aspose.Cells provides this feature using the HtmlSaveOptions.IsExportComments property. If you set it true, then HTML will also display comments present in your Excel file.

Disable Downlevel Revealed Comments while saving to HTML

When you save your Excel file to HTML, then Aspose.Cells reveal Downlevel Conditional Comments. These conditional comments are mostly relevant to old versions of Internet Explorer and are irrelevant to modern Web Browsers. You can read about them in detail at this link. Aspose.Cells allows you to eliminate these Downlevel Revealed Comments by setting the HtmlSaveOptions.DisableDownlevelRevealedComments property to true.

The screenshot shows the effect of this property on output Html when it is not set true.

Disable Downlevel Revealed Comments

Add Digital Signature to an already signed Excel file

Aspose.Cells provides the Workbook.addDigitalSignature(DigitalSignatureCollection digitalSignatureCollection) method that you can use to add digital signature to an already signed Excel file.

Please note while adding digital signature to an already signed Excel document, if the original document is Aspose.Cells generated document, it works well. But if the original document is generated by other engines (e.g. Microsoft Excel etc.), Aspose.Cells cannot keep the file same after loading and re-saving it, this will make the original signature to be invalid.

Create Remove and Get GridCell Comments

Aspose.Cells for GridWeb supports creating, removing and getting GridCell comments. For more detail, please see this article.

Aspose.Cells for Java 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