Place a value to the cell type. The values for the cell typre are:
- CELL_TYPE_NUMERIC
- CELL_TYPE_STRING
- CELL_TYPE_FORMULA
- CELL_TYPE_BLANK
- CELL_TYPE_BOOLEAN
- CELL_TYPE_ERROR
1 excel.Cell.setCellType
<excel.Cell.setCellType>
<cl /> +
</excel.Cell.setCellType>
Arguments | |||||
---|---|---|---|---|---|
Name | Type | Required | Unique | Nullable | Description |
Ecl | Cell | Cell on which you want to place the type. |
Example
A new text sheet and a cell are defined. The string type is fixed for the cell and it is consulted on the screen. Then, the type of boolean is fixed for the same cell and it is verified that it has changed correctly.
Copy
<xsql-script> <body> <set name='wb'> <excel.Workbook /> </set> <set name="sheet_1"> <excel.Workbook.createSheet name="Hoja 1"> <wb/> </excel.Workbook.createSheet> </set> <set name="cell_r2c5"> <excel.Sheet.createCell row="3" col="2"> <sheet_1/> </excel.Sheet.createCell> </set> <println>setting cell type string (value = 1) </println> <excel.Cell.setCellType type="1"> <cell_r2c5/> </excel.Cell.setCellType> <println>cell type = <excel.Cell.getCellType> <cell_r2c5/> </excel.Cell.getCellType> </println> <println>setting cell type boolean(value = 4) </println> <excel.Cell.setCellType type="4"> <cell_r2c5/> </excel.Cell.setCellType> <println>>cell type = <excel.Cell.getCellType> <cell_r2c5/> </excel.Cell.getCellType> </println> </body> </xsql-script>