Hiding Overlaid Content with CrossHideRight while saving to HTML with Node.js via C++
Contents
[
Hide
]
Possible Usage Scenarios
When you save your 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 the cross type to CrossHideRight, then it hides all the strings at the right side of the cell which are overlaid or overlapping with cell string.
Hiding Overlaid Content with CrossHideRight while saving to Html
The following sample code loads the sample Excel file and saves it to output HTML after setting the HtmlSaveOptions.getHtmlCrossStringType() as CrossHideRight. The screenshot explains how CrossHideRight affects the output HTML from default output.
Sample Code
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// Load sample Excel file
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "sampleHidingOverlaidContentWithCrossHideRightWhileSavingToHtml.xlsx");
const workbook = new AsposeCells.Workbook(filePath);
// Specify HtmlSaveOptions - Hide Overlaid Content with CrossHideRight while saving to Html
const opts = new AsposeCells.HtmlSaveOptions();
opts.setHtmlCrossStringType(AsposeCells.HtmlCrossType.CrossHideRight);
// Save to HTML with HtmlSaveOptions
workbook.save(path.join(dataDir, "outputHidingOverlaidContentWithCrossHideRightWhileSavingToHtml.html"), opts);