クライアント側からハイパーリンクを追加/削除する
Contents
[
Hide
]
このトピックでは、Aspose.Cells.GridWebコントロールのクライアント側でのハイパーリンクの追加と削除について説明します。
Aspose.Cells GridWebは現在、クライアント側からハイパーリンクの追加と削除をサポートしています。APIは"addCelllink"および"delCelllink"関数を提供しています。次のコードスニペットは、GridWebでクライアント側からハイパーリンクを追加および削除する方法を示しています。
サンプルコード
This file contains hidden or 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-.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> |
以下のコードスニペットを使用して、シートにリンクすることもできます。
This file contains hidden or 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-.NET | |
linkinfo.url="Sheet4!B8", | |
linkinfo.text="link to sheet4 B8", | |
linkinfo.targetsheetindex= 8, | |
linkinfo.targetcellname="B8" |