Users can type text or numbers in a general cell type. The general cell type can also be used as a base from which to inherit generic cell type information.
The general cell will format the values the user types into strings, numbers, or dates. The text cell formats user typed values as strings.
For details on the properties and methods for this cell type, refer to the GeneralCellType class.
Using Code
- Define the general cell type by creating an instance of the GeneralCellType class.
- Assign the general cell type to a cell.
Example
This example sets a cell to be a general cell.
C# | Copy Code |
---|---|
FarPoint.Web.Spread.GeneralCellType gencell = new FarPoint.Web.Spread.GeneralCellType();
FpSpread1.ActiveSheetView.Cells[1, 1].CellType = gencell;
|
VB | Copy Code |
---|---|
Dim gencell As New FarPoint.Web.Spread.GeneralCellType() FpSpread1.ActiveSheetView.Cells(1, 1).CellType = gencell |
Using the Spread Designer
- In the work area, select the cell or cells for which you want to set the cell type.
- Select the Home menu.
- Select the SetCellType icon under the CellType section.
- Select the cell type and any other cell properties.
- Select OK to close the dialog.
- Click Apply and Exit to close the Spread Designer.