class pyexcel.internal.sheets.Matrix(array)[source]

The internal representation of a sheet data. Each element can be of any python types



The reason a deep copy was not made here is because the data sheet could be huge. It could be costly to copy every cell to a new memory area :param list array: a list of arrays


__init__(array) Constructor
cell_value(row, column[, new_value]) Random access to table cells
column_at(index) Gets the data at the specified column
column_range() Utility function to get column range
columns() Returns a left to right column iterator
contains(predicate) Has something in the table
cut(topleft_corner, bottomright_corner) Get a rectangle shaped data out and clear them in position
delete_columns(column_indices) Delete columns by specified list of indices
delete_rows(row_indices) Deletes specified row indices
enumerate() Iterate cell by cell from top to bottom and from left to right
extend_columns(columns) Inserts two dimensional data after the rightmost column
extend_columns_with_rows(rows) Rows were appended to the rightmost side
extend_rows(rows) Inserts two dimensional data after the bottom row
filter([column_indices, row_indices]) Apply the filter with immediate effect
format(formatter) Apply a formatting action for the whole sheet
get_array(**keywords) Get data in array format
get_bookdict(**keywords) Get data in bookdict format
get_csv(**keywords) Get data in csv format
get_csvz(**keywords) Get data in csvz format
get_dict(**keywords) Get data in dict format
get_fods(**__) fods getter is not defined.
get_handsontable(**keywords) Get data in handsontable format
get_handsontable_html(**keywords) Get data in handsontable.html format
get_html(**__) html getter is not defined.
get_internal_array() present internal array
get_ods(**keywords) Get data in ods format
get_records(**keywords) Get data in records format
get_svg(**keywords) Get data in svg format
get_texttable(**keywords) Get data in texttable format
get_tsv(**keywords) Get data in tsv format
get_tsvz(**keywords) Get data in tsvz format
get_url(**__) url getter is not defined.
get_xls(**keywords) Get data in xls format
get_xlsm(**keywords) Get data in xlsm format
get_xlsx(**keywords) Get data in xlsx format
map(custom_function) Execute a function across all cells of the sheet
number_of_columns() The number of columns
number_of_rows() The number of rows
paste(topleft_corner[, rows, columns]) Paste a rectangle shaped data after a position
plot([file_type]) Visualize the data
rcolumns() Returns a right to left column iterator
region(topleft_corner, bottomright_corner) Get a rectangle shaped data out
register_input(file_type[, instance_name, …]) partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords.
register_io(file_type[, instance_name, …]) partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords.
register_presentation(file_type[, …]) partial(func, *args, **keywords) - new function with partial application of the given arguments and keywords.
reverse() Opposite to enumerate
row_at(index) Gets the data at the specified row
row_range() Utility function to get row range
rows() Returns a top to bottom row iterator
rrows() Returns a bottom to top row iterator
rvertical() Default iterator to go through each cell one by one from rightmost column to leftmost row and from bottom to top example.
save_as(filename, **keywords) Save the content to a named file
save_to_database(session, table[, …]) Save data in sheet to database table
save_to_django_model(model[, initializer, …]) Save to database table through django model
save_to_memory(file_type[, stream]) Save the content to memory
set_array(content, **keywords) Set data in array format
set_bookdict(content, **keywords) Set data in bookdict format
set_column_at(column_index, data_array[, …]) Updates a column data range
set_csv(content, **keywords) Set data in csv format
set_csvz(content, **keywords) Set data in csvz format
set_dict(content, **keywords) Set data in dict format
set_fods(content, **keywords) Set data in fods format
set_handsontable(_y, **_z) handsontable setter is not defined.
set_handsontable_html(_y, **_z) handsontable.html setter is not defined.
set_html(content, **keywords) Set data in html format
set_ods(content, **keywords) Set data in ods format
set_records(content, **keywords) Set data in records format
set_row_at(row_index, data_array) Update a row data range
set_svg(_y, **_z) svg setter is not defined.
set_texttable(_y, **_z) texttable setter is not defined.
set_tsv(content, **keywords) Set data in tsv format
set_tsvz(content, **keywords) Set data in tsvz format
set_url(content, **keywords) Set data in url format
set_xls(content, **keywords) Set data in xls format
set_xlsm(content, **keywords) Set data in xlsm format
set_xlsx(content, **keywords) Set data in xlsx format
to_array() Get an array out
transpose() Rotate the data table by 90 degrees
vertical() Default iterator to go through each cell one by one from leftmost column to rightmost row and from top to bottom example.


array Get/Set data in/from array format
bookdict Get/Set data in/from bookdict format
csv Get/Set data in/from csv format
csvz Get/Set data in/from csvz format
dict Get/Set data in/from dict format
fods Set data in fods format
handsontable Get data in handsontable format
handsontable_html Get data in handsontable.html format
html Set data in html format
ods Get/Set data in/from ods format
records Get/Set data in/from records format
stream Return a stream in which the content is properly encoded
svg Get data in svg format
texttable Get data in texttable format
tsv Get/Set data in/from tsv format
tsvz Get/Set data in/from tsvz format
url Set data in url format
xls Get/Set data in/from xls format
xlsm Get/Set data in/from xlsm format
xlsx Get/Set data in/from xlsx format