Export similar Border Style when Border Style is not supported by Web Browsers with Node.js via C++
Possible Usage Scenarios
Microsoft Excel supports some types of dashed borders which are not supported by Web Browsers. When you convert such an Excel file into HTML using Aspose.Cells for Node.js via C++, such borders are removed. However, Aspose.Cells can also support the display of such borders with the HtmlSaveOptions.getExportSimilarBorderStyle() property. Please set its value as true and the unsupported borders will also be exported to the HTML file.
Export similar Border Style when Border Style is not supported by Web Browsers
The following sample code loads the sample Excel file that contains some unsupported borders as shown in the following screenshot. The screenshot further illustrates the effect of HtmlSaveOptions.getExportSimilarBorderStyle() property inside the output HTML.
Sample Code
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const filePath = path.join(dataDir, "sampleExportSimilarBorderStyle.xlsx");
// Load the sample Excel file
const wb = new AsposeCells.Workbook(filePath);
// Specify Html Save Options - Export Similar Border Style
const opts = new AsposeCells.HtmlSaveOptions();
opts.setExportSimilarBorderStyle(true);
// Save the workbook in Html format with specified Html Save Options
wb.save("outputExportSimilarBorderStyle.html", opts);