更改HTML链接的目标类型

Contents
[ ]

以下代码说明了HtmlSaveOptions.link_target_type属性的用法。它将链接目标类型更改为BLANK。默认情况下为PARENT

from aspose.cells import HtmlLinkTargetType, HtmlSaveOptions, Workbook
# The path to the documents directory.
dataDir = "./"
inputPath = dataDir + "Sample1.xlsx"
outputPath = dataDir + "Output.out.html"
workbook = Workbook(dataDir + "Sample1.xlsx")
opts = HtmlSaveOptions()
opts.link_target_type = HtmlLinkTargetType.SELF
workbook.save(outputPath, opts)
print("File saved: {0}", outputPath)