Hiding Overlaid Content with CrossHideRight while saving to HTML with Node.js via C++

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, it hides all the strings on the right side of the cell that are overlaid or overlapping with cell strings.

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.setHtmlCrossStringType() to CrossHideRight. The screenshot explains how CrossHideRight affects the output HTML compared with the default output.

todo:image_alt_text

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);