CellクラスのBackColorプロパティおよびForeColorプロパティを設定します。
//セルの背景色/文字色を設定します FpSpread1.Cells[1, 1].BackColor = System.Drawing.Color.Blue; FpSpread1.Cells[1, 1].ForeColor = System.Drawing.Color.Red; FpSpread1.Cells[1, 1].Text = "Color";
'セルの背景色/文字色を設定します FpSpread1.Cells(1, 1).BackColor = System.Drawing.Color.Blue FpSpread1.Cells(1, 1).ForeColor = System.Drawing.Color.Red FpSpread1.Cells(1, 1).Text = "Color"
クライアント側で処理することもできます。
<script type="text/javascript"> window.onload = function () { var spread = document.getElementById("FpSpread1"); spread.Cells(1, 1).SetBackColor("blue"); spread.Cells(1, 1).SetForeColor("red"); spread.Cells(1, 1).SetValue("Color"); } </script>
© MESCIUS inc. All rights reserved.