Cell
Overview
Cell is a class in Aspose.Cells for Python.
Represents a single cell in a worksheet.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
value | `` | Read/Write | Holds the cell’s current value, which may be a number, string, date, etc |
formula | `` | Read/Write | Holds the cell’s formula string, if any |
style | `` | Read/Write | References the style object applied to the cell |
comment | `` | Read | Provides access to the cell’s comment object |
data_type | `` | Read | Indicates the data type of the cell’s value |
Methods
| Signature | Description |
|---|---|
__init__(value, formula) | Initializes a new instance of the Cell class. |
is_empty() | Checks if the cell is empty. |
clear_value() | Clears the value of the cell (sets it to None). |
clear_formula() | Clears the formula of the cell (sets it to None). |
clear() | Clears both the value and formula of the cell. |
set_comment(text, author, width, height) | Sets a comment on the cell. |
get_comment() | Gets the comment from the cell. |
clear_comment() | Clears the comment from the cell. |
has_comment() | Checks if the cell has a comment. |
set_comment_size(width, height) | Sets the size of the comment box. |
get_comment_size() | Gets the size of the comment box. |
apply_style(style) | Applies a style to the cell. |
get_style() | Gets the style of the cell. |
clear_style() | Clears the style of the cell (resets to default). |
has_formula() | Checks if the cell has a formula. |
is_numeric_value() | Checks if the cell value is numeric. |
is_text_value() | Checks if the cell value is text. |
is_boolean_value() | Checks if the cell value is boolean. |
is_date_time_value() | Checks if the cell value is a date/time. |
put_value(value) | Sets the value of the cell. |