Cell
Overview
Cell is a class in Aspose.Cells FOSS for Python.
Represents a single cell in a worksheet.
This class provides 20 methods for working with Cell objects in Python programs.
Available methods include: __init__, apply_style, clear, clear_comment, clear_formula, clear_style, clear_value, get_comment, get_comment_size, get_style, has_comment, has_formula, and 8 additional methods.
All exported members are accessible to any Python application after installing the Aspose.Cells FOSS for Python package.
Properties: comment, data_type, formula, style, value.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
value | `` | Read | Gets or sets the value of the cell. |
formula | `` | Read | Gets or sets the formula of the cell. |
style | `` | Read | Gets or sets the style of the cell. |
comment | `` | Read | Gets the comment associated with the cell. |
data_type | `` | Read | Gets the data type of the cell 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. |