クライアント側からのフォント設定の更新

Aspose.Cells GridWeb は、クライアント側からのフォント設定の変更をサポートするようになりました。このために、API は次の機能を提供します。

  • updateCellFontStyle: Params - 通常/斜体/太字/斜体&&太字の r/i/b/ib
  • updateCellFontSize: Params - フォント名など ‘System’
  • updateCellFontName: パラメータ - フォントサイズなど「12pt」
  • updateCellFontColor: パラメータ - none/u/l/ul/ for none/underline/strikout/underline&&strikout
  • updateCellFontLine: Params - #aa22ee のような html の色、または緑、赤などのよく知られた色の名前…
  • updateCellBackGroundColor: Params - #aa22ee のような html の色、または緑、赤などのよく知られた色の名前…

次のコード スニペットは、GridWeb でクライアント側からフォント設定を変更する方法を示しています。

サンプルコード

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
<script>
function makeFontItalic(){
gridwebinstance.getByIndex(0).rangeupdate(updateCellFontStyle, "i");
}
function makeFontBold(){
gridwebinstance.getByIndex(0).rangeupdate(updateCellFontStyle, "b");
}
function changeFontSize(){
gridwebinstance.getByIndex(0).rangeupdate(updateCellFontSize, "5pt");
}
function changeFontFamily(){
gridwebinstance.getByIndex(0).rangeupdate(updateCellFontName, "Corbel Light");
}
function changeFontColor(){
gridwebinstance.getByIndex(0).rangeupdate(updateCellFontColor, "green");
}
function changeFontBackgroundColor(){
gridwebinstance.getByIndex(0).rangeupdate(updateCellBackGroundColor, "yellow");
}
</script>