从客户端添加/删除超链接

Contents
[ ]

Aspose.Cells GridWeb 现在支持从客户端添加和删除超链接。为此,API 提供了“addCelllink”和“delCelllink”函数。以下代码片段演示了在 GridWeb 中从客户端添加和删除超链接。

示例代码

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
<script>
function addLink() {
var linkinfo={};
linkinfo.url="http://www.aspose.com",
linkinfo.text="Link to Aspose Webbsite",
gridwebinstance.getByIndex(0).rangeupdate(addCelllink,linkinfo);
}
function removeLink() {
gridwebinstance.getByIndex(0).rangeupdate(delCelllink);
}
</script>

您还可以使用以下代码片段链接到工作表。

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
linkinfo.url="Sheet4!B8",
linkinfo.text="link to sheet4 B8",
linkinfo.targetsheetindex= 8,
linkinfo.targetcellname="B8"