Changer le type de lien HTML cible

Contents
[ ]

Le code suivant illustre l’utilisation de la propriété HtmlSaveOptions.link_target_type. Il modifie le type de cible du lien en BLANK. Par défaut, c’est le PARENT.

from aspose.cells import HtmlLinkTargetType, HtmlSaveOptions, Workbook
# For complete examples and data files, please go to https:# github.com/aspose-cells/Aspose.Cells-for-.NET
# The path to the documents directory.
dataDir = RunExamples.GetDataDir(".")
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)