HTML Bağlantı Hedefi Türünü değiştirin
Contents
[
Hide
]
Aspose.Cells, HTML bağlantı hedefi türünü değiştirmenizi sağlar. HTML bağlantısı şöyle görünür:
<a href="http://www.aspose.com/" target="_self">
Yukarıdaki HTML bağlantısındaki hedef özniteliği görebileceğiniz gibi _self şeklindedir. HtmlSaveOptions.setLinkTargetType() özelliğini kullanarak bu hedef niteliğini kontrol edebilirsiniz. Bu özellik, aşağıdaki değerlere sahip HtmlLinkTargetType numaralandırmasını alır.
HTML Bağlantı Hedefi Türünü değiştirin
Aşağıdaki kod kullanımını göstermektedirHtmlSaveOptions.setLinkTargetType() Emlak. Bağlantı hedefi türünü şu şekilde değiştirir:boşluk. Varsayılan olarak,ebeveyn . alabilirsinkaynak excel dosyası ancak bu bağlantıdan, bu kodu çalıştırmak için içinde HTML hiper bağlantısı bulunan herhangi bir excel dosyasını kullanabilirsiniz.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-Java | |
// The path to the documents directory. | |
String dataDir = Utils.getDataDir(ChangeHTMLLinkTargetType.class); | |
Workbook workbook = new Workbook(dataDir + "source.xlsx"); | |
HtmlSaveOptions opts = new HtmlSaveOptions(); | |
opts.setLinkTargetType(HtmlLinkTargetType.SELF); | |
workbook.save(dataDir + "out.html", opts); |