更改 HTML 链接目标类型

Contents
[ ]

下面的代码说明了使用HtmlSaveOptions.LinkTargetType财产。它将链接目标类型更改为空白的.默认情况下,它是父母.

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
// The path to the documents directory.
string dataDir = RunExamples.GetDataDir(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
string inputPath = dataDir + "Sample1.xlsx";
string outputPath = dataDir + "Output.out.html";
Workbook workbook = new Workbook(dataDir + "Sample1.xlsx");
HtmlSaveOptions opts = new HtmlSaveOptions();
opts.LinkTargetType = HtmlLinkTargetType.Self;
workbook.Save(outputPath, opts);
Console.WriteLine("File saved: {0}", outputPath);