この例では、7列10行から成るスプレッドシートを設定し、CellオブジェクトとIEditorオブジェクトを作成します。IEditorオブジェクトはGeneralCellTypeオブジェクトとして宣言し、Cellオブジェクトのエディタとして使用します。これを検証するため、CellオブジェクトのEditorをテキストボックスに返します。
FpSpread1.Sheets[0].ColumnCount = 7;
FpSpread1.Sheets[0].RowCount = 50;
FarPoint.Web.Spread.Cell mycell;
FarPoint.Web.Spread.Editor.IEditor ed;
ed = new FarPoint.Web.Spread.GeneralCellType();
mycell = FpSpread1.Cells[0, 0];
mycell.Editor = ed;
TextBox1.Text = Convert.ToString(mycell.Editor);
FpSpread1.Sheets(0).ColumnCount = 7
FpSpread1.Sheets(0).RowCount = 10
Dim mycell As FarPoint.Web.Spread.Cell
Dim ed As FarPoint.Web.Spread.Editor.IEditor
ed = New FarPoint.Web.Spread.GeneralCellType()
mycell = FpSpread1.Cells(0, 0)
mycell.Editor = ed
TextBox1.Text = Convert.ToString(mycell.Editor)