SPREAD for ASP.NET 10.0J パフォーマンスガイドライン > セル型の構成 > 編集可能なセル型 |
シート上での編集が可能なセル型として8種類のセルが提供されています。各セルで提供される機能はそれぞれ異なるものですが、出力されるタグの構成に大きな違いはありません。これはセルを編集した時に表示される編集用コントロールは、tdタグとは別の箇所で定義されていることによるものです。
FarPoint.Web.Spread.GeneralCellType gen = new FarPoint.Web.Spread.GeneralCellType(); FpSpread1.ActiveSheetView.Cells[0, 0].CellType = gen; FpSpread1.ActiveSheetView.SetValue(0, 0, "abc");
Dim gen As New FarPoint.Web.Spread.GeneralCellType() FpSpread1.ActiveSheetView.Cells(0, 0).CellType = gen FpSpread1.ActiveSheetView.SetValue(0, 0, "abc")
バイト数:83
<td class="s0s2" FpCellType="GeneralCellType" FpEditorID="FpSpread1_ctl02">abc</td>
FarPoint.Web.Spread.TextCellType text = new FarPoint.Web.Spread.TextCellType(); FpSpread1.ActiveSheetView.Cells[0, 0].CellType = text; FpSpread1.ActiveSheetView.SetValue(0, 0, "abc");
Dim text As New FarPoint.Web.Spread.TextCellType() FpSpread1.ActiveSheetView.Cells(0, 0).CellType = text FpSpread1.ActiveSheetView.SetValue(0, 0, "abc")
バイト数:52
<td class="s0s2" FpRef="FpSpread1_FpRef0r0">abc</td>
FarPoint.Web.Spread.DateTimeCellType dt = new FarPoint.Web.Spread.DateTimeCellType();
FpSpread1.ActiveSheetView.Cells[0, 0].CellType = dt;
FpSpread1.ActiveSheetView.SetValue(0, 0, New DateTime(2016, 4, 1));
Dim dt As New FarPoint.Web.Spread.DateTimeCellType() FpSpread1.ActiveSheetView.Cells(0, 0).CellType = dt FpSpread1.ActiveSheetView.SetValue(0, 0, New DateTime(2016, 4, 1))
バイト数:144
<td class="s0s2" align="left" CellType2="DateTimeCellType" FpEditorID="FpSpread1_ctl02" style="white-space:nowrap;"><nobr>2016/04/01</nobr></td>
FarPoint.Web.Spread.IntegerCellType intcell = new FarPoint.Web.Spread.IntegerCellType();
FpSpread1.ActiveSheetView.Columns[0, 0].CellType = intcell;
FpSpread1.ActiveSheetView.SetValue(0, 0, 123);
Dim intcell As New FarPoint.Web.Spread.IntegerCellType() FpSpread1.ActiveSheetView.Columns(0, 0).CellType = intcell FpSpread1.ActiveSheetView.SetValue(0, 0, 123)
バイト数:107
<td class="s0s2" align="right" FpRef="FpSpread1_FpRef0r0" style="white-space:nowrap;"><nobr>123</nobr></td>
FarPoint.Web.Spread.DoubleCellType dblcell = new FarPoint.Web.Spread.DoubleCellType();
FpSpread1.ActiveSheetView.Cells[0, 0].CellType = dblcell;
FpSpread1.ActiveSheetView.SetValue(0, 0, 12.3);
Dim dblcell As New FarPoint.Web.Spread.DoubleCellType() FpSpread1.ActiveSheetView.Cells(0, 0).CellType = dblcell FpSpread1.ActiveSheetView.SetValue(0, 0, 12.3)
バイト数:108
<td class="s0s2" align="right" FpRef="FpSpread1_FpRef0r0" style="white-space:nowrap;"><nobr>12.3</nobr></td>
FarPoint.Web.Spread.CurrencyCellType currcell = new FarPoint.Web.Spread.CurrencyCellType();
FpSpread1.ActiveSheetView.Cells[0, 0].CellType = currcell;
FpSpread1.ActiveSheetView.SetValue(0, 0, 123);
Dim currcell As New FarPoint.Web.Spread.CurrencyCellType() FpSpread1.ActiveSheetView.Cells(0, 0).CellType = currcell FpSpread1.ActiveSheetView.SetValue(0, 0, 123)
バイト数:113
<td class="s0s2" align="right" FpRef="FpSpread1_FpRef0r0" style="white-space:nowrap;"><nobr>¥123</nobr></td>
FarPoint.Web.Spread.PercentCellType pctcell = new FarPoint.Web.Spread.PercentCellType();
FpSpread1.ActiveSheetView.Cells[0, 0].CellType = pctcell;
FpSpread1.ActiveSheetView.SetValue(0, 0, 0.12);
Dim pctcell As New FarPoint.Web.Spread.PercentCellType() FpSpread1.ActiveSheetView.Cells(0, 0).CellType = pctcell FpSpread1.ActiveSheetView.SetValue(0, 0, 0.12)
バイト数:107
<td class="s0s2" align="right" FpRef="FpSpread1_FpRef0r0" style="white-space:nowrap;"><nobr>12%</nobr></td>
FarPoint.Web.Spread.RegExpCellType rgex = new FarPoint.Web.Spread.RegExpCellType(); rgex.ValidationExpression = "^\\d{3}-\\d{2}-\\d{4}$"; rgex.ErrorMessage = "書式が異なります"; FpSpread1.ActiveSheetView.Cells[0, 0].CellType = rgex; FpSpread1.ActiveSheetView.SetValue(0, 0, "123-45-6789");
Dim rgex As New FarPoint.Web.Spread.RegExpCellType() rgex.ValidationExpression = "^\d{3}-\d{2}-\d{4}$" rgex.ErrorMessage = "書式が異なります" FpSpread1.ActiveSheetView.Cells(0, 0).CellType = rgex FpSpread1.ActiveSheetView.SetValue(0, 0, "123-45-6789")
バイト数:101
<td class="s0s2" FpRef="FpSpread1_FpRef0r0" style="white-space:nowrap;"><nobr>123-45-6789</nobr></td>