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)