Cells class

Cells class

Encapsulates a collection of cell relevant objects, such as Cell, Row, …etc.

The Cells type exposes the following members:

Properties

PropertyDescription
ods_cell_fieldsGets the list of fields of ods.
countGets the total count of instantiated Cell objects.
count_largeGets the total count of instantiated Cell objects.
rowsGets the collection of Row objects that represents the individual rows in this worksheet.
merged_cellsGets the collection of merged cells.
multi_thread_readingGets or sets whether the cells data model should support Multi-Thread reading.
Default value of this property is false.
memory_settingGets or sets the memory usage option for this cells.
styleGets and sets the default style of the worksheet.
standard_width_inchGets or sets the default column width in the worksheet, in unit of inches.
standard_width_pixelsGets or sets the default column width in the worksheet, in unit of pixels.
standard_widthGets or sets the default column width in the worksheet, in unit of characters.
standard_heightGets or sets the default row height in this worksheet, in unit of points.
standard_height_pixelsGets or sets the default row height in this worksheet, in unit of pixels.
standard_height_inchGets or sets the default row height in this worksheet, in unit of inches.
preserve_stringGets or sets a value indicating whether all worksheet values are preserved as strings.
Default is false.
min_rowMinimum row index of cell which contains data or style.
max_rowMaximum row index of cell which contains data or style.
min_columnMinimum column index of those cells that have been instantiated in the collection(does not include the column
where style is defined for the whole column but no cell has been instantiated in it).
max_columnMaximum column index of those cells that have been instantiated in the collection(does not include the column
where style is defined for the whole column but no cell has been instantiated in it).
min_data_rowMinimum row index of cell which contains data.
max_data_rowMaximum row index of cell which contains data.
min_data_columnMinimum column index of cell which contains data.
max_data_columnMaximum column index of cell which contains data.
is_default_row_height_matchedIndicates that row height and default font height matches
is_default_row_hiddenIndicates whether the row is default hidden.
columnsGets the collection of Column objects that represents the individual columns in this worksheet.
rangesGets the collection of Range objects created at run time.
last_cellGets the last cell in this worksheet.
max_display_rangeGets the max range which includes data, merged cells and shapes.
first_cellGets the first cell in this worksheet.

Methods

MethodDescription
create_range(self, upper_left_cell, lower_right_cell)Creates a Range object from a range of cells.
create_range(self, first_row, first_column, total_rows, total_columns)Creates a Range object from a range of cells.
create_range(self, address)Creates a Range object from an address of the range.
create_range(self, first_index, number, is_vertical)Creates a Range object from rows of cells or columns of cells.
get(self, row, column)Add API for Python Via .Net.since this[int row, int column] is unsupported
get(self, cell_name)Add API for Python Via .Net.since this[string cellName] is unsupported
import_object_array(self, obj_array, first_row, first_column, is_vertical)Imports an array of data into a worksheet.
import_object_array(self, obj_array, first_row, first_column, is_vertical, skip)Imports an array of data into a worksheet.
import_array(self, string_array, first_row, first_column, is_vertical)Imports an array of string into a worksheet.
import_array(self, int_array, first_row, first_column, is_vertical)Imports an array of integer into a worksheet.
import_array(self, double_array, first_row, first_column, is_vertical)Imports an array of double into a worksheet.
import_csv(self, file_name, splitter, convert_numeric_data, first_row, first_column)Import a CSV file to the cells.
import_csv(self, stream, splitter, convert_numeric_data, first_row, first_column)Import a CSV file to the cells.
import_csv(self, file_name, options, first_row, first_column)Import a CSV file to the cells.
import_csv(self, stream, options, first_row, first_column)Import a CSV file to the cells.
merge(self, first_row, first_column, total_rows, total_columns)Merges a specified range of cells into a single cell.
merge(self, first_row, first_column, total_rows, total_columns, merge_conflict)Merges a specified range of cells into a single cell.
merge(self, first_row, first_column, total_rows, total_columns, check_conflict, merge_conflict)Merges a specified range of cells into a single cell.
get_row_height(self, row, is_original, unit_type)Gets row’s height.
get_row_height(self, row)Gets the height of a specified row, in unit of points.
get_column_width(self, column, is_original, unit_type)Gets the column width.
get_column_width(self, column)Gets the width(in unit of characters) of the specified column in normal view
get_column_width_pixel(self, column)Gets the width of the specified column in normal view, in units of pixel.
get_column_width_pixel(self, column, original)Gets the width of the specified column in normal view, in units of pixel.
copy_columns(self, source_cells0, source_column_index, destination_column_index, column_number, paste_options)Copies data and formats of a whole column.
copy_columns(self, source_cells0, source_column_index, destination_column_index, column_number)Copies data and formats of a whole column.
copy_columns(self, source_cells, source_column_index, source_total_columns, destination_column_index, destination_total_columns)Copies data and formats of the whole columns.
copy_rows(self, source_cells, source_row_index, destination_row_index, row_number)Copies data and formats of some whole rows.
copy_rows(self, source_cells0, source_row_index, destination_row_index, row_number, copy_options)Copies data and formats of some whole rows.
copy_rows(self, source_cells0, source_row_index, destination_row_index, row_number, copy_options, paste_options)Copies data and formats of some whole rows.
group_columns(self, first_index, last_index)Groups columns.
group_columns(self, first_index, last_index, is_hidden)Groups columns.
ungroup_rows(self, first_index, last_index, is_all)Ungroups rows.
ungroup_rows(self, first_index, last_index)Ungroups rows.
group_rows(self, first_index, last_index, is_hidden)Groups rows.
group_rows(self, first_index, last_index)Groups rows.
delete_column(self, column_index, update_reference)Deletes a column.
delete_column(self, column_index)Deletes a column.
delete_columns(self, column_index, total_columns, update_reference)Deletes several columns.
delete_columns(self, column_index, total_columns, options)Deletes several columns.
delete_row(self, row_index)Deletes a row.
delete_row(self, row_index, update_reference)Deletes a row.
delete_rows(self, row_index, total_rows)Deletes multiple rows.
delete_rows(self, row_index, total_rows, update_reference)Deletes multiple rows in the worksheet.
delete_rows(self, row_index, total_rows, options)Deletes multiple rows in the worksheet.
delete_blank_columns(self)Delete all blank columns which do not contain any data.
delete_blank_columns(self, options)Delete all blank columns which do not contain any data.
delete_blank_rows(self)Delete all blank rows which do not contain any data or other object.
delete_blank_rows(self, options)Delete all blank rows which do not contain any data or some special objects such as visible comment, pivot table.
insert_columns(self, column_index, total_columns)Inserts some columns into the worksheet.
insert_columns(self, column_index, total_columns, update_reference)Inserts some columns into the worksheet.
insert_columns(self, column_index, total_columns, options)Inserts some columns into the worksheet.
insert_column(self, column_index, update_reference)Inserts a new column into the worksheet.
insert_column(self, column_index)Inserts a new column into the worksheet.
insert_rows(self, row_index, total_rows, update_reference)Inserts multiple rows into the worksheet.
insert_rows(self, row_index, total_rows, options)Inserts multiple rows into the worksheet.
insert_rows(self, row_index, total_rows)Inserts multiple rows into the worksheet.
clear_range(self, range)Clears contents and formatting of a range.
clear_range(self, start_row, start_column, end_row, end_column)Clears contents and formatting of a range.
clear_contents(self, range)Clears contents of a range.
clear_contents(self, start_row, start_column, end_row, end_column)Clears contents of a range.
clear_formats(self, range)Clears formatting of a range.
clear_formats(self, start_row, start_column, end_row, end_column)Clears formatting of a range.
find(self, what, previous_cell)Finds the cell containing with the input object.
find(self, what, previous_cell, find_options)Finds the cell containing with the input object.
end_cell_in_row(self, row_index)Gets the last cell in this row.
end_cell_in_row(self, start_row, end_row, start_column, end_column)Gets the last cell with maximum row index in this range.
end_cell_in_column(self, column_index)Gets the last cell in this column.
end_cell_in_column(self, start_row, end_row, start_column, end_column)Gets the last cell with maximum column index in this range.
insert_range(self, area, shift_number, shift_type, update_reference)Inserts a range of cells and shift cells according to the shift option.
insert_range(self, area, shift_type)Inserts a range of cells and shift cells according to the shift option.
insert_range(self, area, shift_number, shift_type)Inserts a range of cells and shift cells according to the shift option.
subtotal(self, ca, group_by, function, total_list)Creates subtotals for the range.
subtotal(self, ca, group_by, function, total_list, replace, page_breaks, summary_below_data)Creates subtotals for the range.
remove_duplicates(self)Removes duplicate rows in the sheet.
remove_duplicates(self, start_row, start_column, end_row, end_column)Removes duplicate values in the range.
remove_duplicates(self, start_row, start_column, end_row, end_column, has_headers, column_offsets)Removes duplicate data of the range.
get_cell_display_style(self, row, column)Get the display style of given cell.
get_cell_display_style(self, row, column, adjacent_borders)Get the display style of given cell.
get_row_enumerator(self)Gets the rows enumerator.
get_merged_areas(self)Gets all merged cells.
get_cell(self, row, column)Gets the Cell element or null at the specified cell row index and column index.
get_row(self, row)Gets the Row element at the specified cell row index.
check_cell(self, row, column)Gets the Cell element or null at the specified cell row index and column index.
check_row(self, row)Gets the Row element or null at the specified cell row index.
check_column(self, column_index)Gets the Column element or null at the specified column index.
is_row_hidden(self, row_index)Checks whether a row at given index is hidden.
is_column_hidden(self, column_index)Checks whether a column at given index is hidden.
add_range(self, range_object)Adds a range object reference to cells
clear(self)Clears all data of the worksheet.
import_array_list(self, array_list, first_row, first_column, is_vertical)Imports an arraylist of data into a worksheet.
import_formula_array(self, string_array, first_row, first_column, is_vertical)Imports an array of formula into a worksheet.
text_to_columns(self, row, column, total_rows, options)Splits content in specified column into multiple columns..
un_merge(self, first_row, first_column, total_rows, total_columns)Unmerges a specified range of merged cells.
clear_merged_cells(self)Clears all merged ranges.
hide_row(self, row)Hides a row.
unhide_row(self, row, height)Unhides a row.
hide_rows(self, row, total_rows)Hides multiple rows.
unhide_rows(self, row, total_rows, height)Unhides the hidden rows.
set_row_height_pixel(self, row, pixels)Sets row height in unit of pixels.
set_row_height_inch(self, row, inches)Sets row height in unit of inches.
set_row_height(self, row, height)Sets the height of the specified row.
get_row_original_height_point(self, row)Gets original row’s height in unit of point if the row is hidden
get_column_original_width_point(self, column)Gets original column’s height in unit of point if the column is hidden
hide_column(self, column)Hides a column.
unhide_column(self, column, width)Unhides a column
hide_columns(self, column, total_columns)Hide multiple columns.
unhide_columns(self, column, total_columns, width)Unhide multiple columns.
get_view_row_height(self, row)Gets the height of a specified row.
get_row_height_inch(self, row)Gets the height of a specified row in unit of inches.
get_view_row_height_inch(self, row)Gets the height of a specified row in unit of inches.
get_row_height_pixel(self, row)Gets the height of a specified row in unit of pixel.
set_column_width_pixel(self, column, pixels)Sets column width in unit of pixels in normal view.
set_column_width_inch(self, column, inches)Sets column width in unit of inches in normal view.
set_column_width(self, column, width)Sets the width of the specified column in normal view.
get_column_width_inch(self, column)Gets the width of the specified column in normal view, in units of inches.
get_view_column_width_pixel(self, column)Get the width in different view type.
set_view_column_width_pixel(self, column, pixels)Sets the width of the column in different view.
get_last_data_row(self, column)Gets the last row index of cell which contains data in the specified column.
apply_column_style(self, column, style, flag)Applies formats for a whole column.
apply_row_style(self, row, style, flag)Applies formats for a whole row.
apply_style(self, style, flag)Applies formats for a whole worksheet.
copy_column(self, source_cells, source_column_index, destination_column_index)Copies data and formats of a whole column.
copy_row(self, source_cells, source_row_index, destination_row_index)Copies data and formats of a whole row.
get_grouped_row_outline_level(self, row_index)Gets the outline level (zero-based) of the row.
get_grouped_column_outline_level(self, column_index)Gets the outline level (zero-based) of the column.
get_max_grouped_column_outline_level(self)Gets the max grouped column outline level (zero-based).
get_max_grouped_row_outline_level(self)Gets the max grouped row outline level (zero-based).
show_group_detail(self, is_vertical, index)Expands the grouped rows/columns.
hide_group_detail(self, is_vertical, index)Collapses the grouped rows/columns.
ungroup_columns(self, first_index, last_index)Ungroups columns.
is_deleting_range_enabled(self, start_row, start_column, total_rows, total_columns)Check whether the range could be deleted.
is_blank_column(self, column_index)Checks whether given column is blank(does not contain any data).
insert_row(self, row_index)Inserts a new row into the worksheet.
link_to_xml_map(self, map_name, row, column, path)Link to a xml map.
move_range(self, source_area, dest_row, dest_column)Moves the range.
insert_cut_cells(self, cut_range, row, column, shift_type)Insert cut range.
delete_range(self, start_row, start_column, end_row, end_column, shift_type)Deletes a range of cells and shift cells according to the shift option.
retrieve_subtotal_setting(self, ca)Retrieves subtotals setting of the range.
remove_formulas(self)Removes all formula and replaces with the value of the formula.
convert_string_to_numeric_value(self)Converts all string data in the worksheet to numeric value if possible.
get_dependents(self, is_all, row, column)Get all cells which refer to the specific cell.
get_dependents_in_calculation(self, row, column, recursive)Gets all cells whose calculated result depends on specific cell.
get_cells_with_place_in_cell_picture(self)Gets all cells that contain embedded picture.
get_cell_style(self, row, column)Get the style of given cell.

Remarks

See Also