Node.jsとC++を使用してHTMLのリンクターゲットタイプを変更

Contents
[ ]

以下のコードはHtmlSaveOptions.getLinkTargetType()プロパティの使用例を示しています。リンクターゲットタイプをblankに変更します。デフォルトは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}`);