Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Cells allows you to change the HTML link target type. HTML link looks like this
<a href="http://www.aspose.com/" target="_self">
As you can see, the target attribute in the above HTML link is _self. You can control this target attribute using the HtmlSaveOptions.getLinkTargetType() property. This property takes the HtmlLinkTargetType enum which has the following values.
The following code illustrates the usage of HtmlSaveOptions.getLinkTargetType() property. It changes the link target type to blank. By default, it is parent.
const path = require("path");
const AsposeCells = require("aspose.cells.node");
// The path to the documents directory.
const dataDir = path.join(__dirname, "data");
const inputPath = path.join(dataDir, "Sample1.xlsx");
const outputPath = path.join(dataDir, "Output.out.html");
const workbook = new AsposeCells.Workbook(inputPath);
const opts = new AsposeCells.HtmlSaveOptions();
opts.setLinkTargetType(AsposeCells.HtmlLinkTargetType.Self);
workbook.save(outputPath, opts);
console.log(`File saved: ${outputPath}`);
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.