Gnm.Sheet

g GObject.Object GObject.Object Gnm.Sheet Gnm.Sheet GObject.Object->Gnm.Sheet

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

apply_style_undo (sr, style)

class

cell_queue_respan (cell)

class

cell_set_expr (cell, texpr)

class

clear_region_undo (sr, clear_flags)

class

conditions_share_conditions_add (conds)

class

conditions_share_conditions_remove (conds)

class

flag_status_update_cell (cell)

class

merge_relocate (ri)

class

move_range (rinfo, cc)

class

new (wb, name, columns, rows)

class

new_with_type (wb, name, type, columns, rows)

class

objects_relocate (rinfo, update)

class

style_insdel_colrow (rinfo)

class

style_relocate (rinfo)

class

suggest_size (cols, rows)

class

valid_size (cols, rows)

add_sort_setup (key, setup)

apply_border (range, borders)

apply_style (range, style)

cell_create (col, row)

cell_fetch (col, row)

cell_foreach (callback, *data)

cell_get (col, row)

cell_get_value (col, row)

cell_positions (comments)

cell_remove (cell, redraw, queue_recalc)

cell_set_text (col, row, str)

cell_set_value (col, row, v)

cells (r)

cells_count ()

clear_region (start_col, start_row, end_col, end_row, clear_flags, cc)

col_fetch (col)

col_get (col)

col_get_default_size_pixels ()

col_get_default_size_pts ()

col_get_distance_pixels (from_, to)

col_get_distance_pts (from_, to)

col_get_info (col)

col_is_hidden (col)

col_set_default_size_pixels (width_pixels)

col_set_default_size_pts (width_pts)

col_set_size_pixels (col, width_pixels, set_by_user)

col_set_size_pts (col, width_pts, set_by_user)

col_size_fit_pixels (col, srow, erow, ignore_strings)

colrow_can_group (r, is_cols)

colrow_copy_info (colrow, is_cols, cri)

colrow_fetch (colrow, is_cols)

colrow_foreach (is_cols, first, last, callback, *user_data)

colrow_get (colrow, is_cols)

colrow_get_default (is_cols)

colrow_get_distance_pixels (is_cols, from_, to)

colrow_get_info (colrow, is_cols)

colrow_group_ungroup (r, is_cols, inc)

colrow_gutter (is_cols, max_outline)

colrow_optimize ()

conditions_add (r, style)

conditions_dump ()

conditions_init ()

conditions_link_unlink_dependents (r, qlink)

conditions_remove (r, style)

conditions_simplify ()

conditions_uninit ()

date_conv ()

delete_cols (col, count, cc)

delete_rows (row, count, cc)

destroy_contents ()

dup ()

filter_at_pos (pos)

filter_can_be_extended (f, r)

filter_insdel_colrow (is_cols, is_insert, start, count)

filter_intersect_rows (from_, to)

find_boundary_horizontal (col, move_row, base_row, count, jump_to_boundaries)

find_boundary_vertical (move_col, row, base_col, count, jump_to_boundaries)

find_sort_setup (key)

flag_recompute_spans ()

flag_status_update_range (range)

flag_style_update_range (range)

foreach_cell_in_range (flags, r, callback, closure)

foreach_cell_in_region (flags, start_col, start_row, end_col, end_row, callback, closure)

foreach_name (func, *data)

freeze_object_views (qfreeze)

get_cells_extent ()

get_comment (pos)

get_conventions ()

get_extent (spans_and_merges_extend, include_hidden)

get_nominal_printarea ()

get_printarea (include_styles, ignore_printarea)

get_size ()

get_size2 (wb)

get_sort_setups ()

get_view (wbv)

guess_data_range (region)

guess_region (region)

hlink_find (pos)

insert_cols (col, count, cc)

insert_rows (row, count, cc)

is_cell_empty (col, row)

is_region_empty (r)

mark_dirty ()

merge_add (r, clear, cc)

merge_contains_pos (pos)

merge_find_bounding_box (r)

merge_get_adjacent (pos)

merge_get_overlap (r)

merge_is_corner (pos)

merge_remove (r)

names_check (r)

objects_clear (r, t)

objects_dup (dst, range)

objects_get (r, t)

queue_redraw_range (range)

queue_respan (start_row, end_row)

range_bounding_box (r)

range_calc_spans (r, flags)

range_contains_merges_or_arrays (r, cc, cmd, merges, arrays)

range_has_heading (src, top, ignore_styles)

range_splits_array (r, ignore, cc, cmd)

range_splits_region (r, ignore, cc, cmd)

range_trim (r, cols, rows)

range_unrender (r)

ranges_split_region (ranges, cc, cmd)

recompute_spans_for_col (col)

redraw_all (header)

redraw_range (range)

redraw_region (start_col, start_row, end_col, end_row)

region_queue_recalc (range)

resize (cols, rows, cc)

row_fetch (row)

row_get (row)

row_get_default_size_pixels ()

row_get_default_size_pts ()

row_get_distance_pixels (from_, to)

row_get_distance_pts (from_, to)

row_get_info (row)

row_is_hidden (row)

row_set_default_size_pixels (height_pixels)

row_set_default_size_pts (height_pts)

row_set_size_pixels (row, height_pixels, set_by_user)

row_set_size_pts (row, height_pts, set_by_user)

row_size_fit_pixels (row, scol, ecol, ignore_strings)

scenario_add (sc)

scenario_find (name)

scenario_remove (sc)

scrollbar_config ()

selection_is_allowed (pos)

set_outline_direction (is_cols)

set_solver_params (param)

slicers_at_pos (pos)

style_apply_border (range, borders)

style_apply_col (col, style)

style_apply_pos (col, row, style)

style_apply_row (row, style)

style_collect_conditions (r)

style_collect_hlinks (r)

style_collect_validations (r)

style_default ()

style_find (st)

style_find_conflicts (r, style)

style_foreach (func, *user_data)

style_get (col, row)

style_get_auto_pattern_color ()

style_get_extent (r)

style_get_nondefault_extent (extent, src, col_defaults)

style_get_nondefault_rows (col_defaults)

style_get_range (r)

style_get_row (sr)

style_get_row2 (row)

style_init ()

style_is_default (r, col_defaults)

style_most_common (is_col)

style_optimize ()

style_range_foreach (r, func, *user_data)

style_region_contains_link (r)

style_resize (cols, rows)

style_set_auto_pattern_color (grid_color)

style_set_list (corner, l, range_modify, *data)

style_set_pos (col, row, style)

style_set_range (range, style)

style_shutdown ()

style_unlink (st)

style_update_grid_color (context)

update ()

update_only_grid ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

columns

int

r/w/co

Columns number in the sheet

conventions

Gnm.Conventions

r/w

How to format displayed expressions, (A1 vs R1C1, function names, …)

display-column-header

bool

r/w

Control whether column headers are shown.

display-formulas

bool

r/w

Control whether formulæ are shown instead of values.

display-grid

bool

r/w

Control whether the grid is shown.

display-outlines

bool

r/w

Control whether outlines are shown.

display-outlines-below

bool

r/w

Control whether outline symbols are shown below.

display-outlines-right

bool

r/w

Control whether outline symbols are shown to the right.

display-row-header

bool

r/w

Control whether Gnm.row headers are shown.

display-zeros

bool

r/w

Control whether zeros are shown are blanked out.

name

str

r/w

The name of the sheet.

protected

bool

r/w

Gnm.Sheet is protected.

protected-allow-cell-formatting

bool

r/w

Allow cell format changes while a sheet is protected

protected-allow-column-formatting

bool

r/w

Allow column formatting while a sheet is protected

protected-allow-delete-columns

bool

r/w

Allow columns to be deleted while a sheet is protected

protected-allow-delete-rows

bool

r/w

Allow rows to be deleted while a sheet is protected

protected-allow-edit-auto-filters

bool

r/w

Allow auto filters to be edited while a sheet is protected

protected-allow-edit-objects

bool

r/w

Allow objects to be edited while a sheet is protected

protected-allow-edit-pivottable

bool

r/w

Allow pivottable to be edited while a sheet is protected

protected-allow-edit-scenarios

bool

r/w

Allow scenarios to be edited while a sheet is protected

protected-allow-insert-columns

bool

r/w

Allow columns to be inserted while a sheet is protected

protected-allow-insert-hyperlinks

bool

r/w

Allow hyperlinks to be inserted while a sheet is protected

protected-allow-insert-rows

bool

r/w

Allow rows to be inserted while a sheet is protected

protected-allow-row-formatting

bool

r/w

Allow Gnm.row formatting while a sheet is protected

protected-allow-select-locked-cells

bool

r/w

Allow the user to select locked cells while a sheet is protected

protected-allow-select-unlocked-cells

bool

r/w

Allow the user to select unlocked cells while a sheet is protected

protected-allow-sort-ranges

bool

r/w

Allow ranges to be sorted while a sheet is protected

rows

int

r/w/co

Rows number in the sheet

sheet-type

Gnm.SheetType

r/w/co

Which type of sheet this is.

tab-background

Gnm.Color

r/w

The background color of the tab.

tab-foreground

Gnm.Color

r/w

The foreground color of the tab.

text-is-rtl

bool

r/w

Text goes from right to left.

use-r1c1

bool

r/w

How to format displayed expressions, (a convenience api)

visibility

Gnm.SheetVisibility

r/w

How visible the sheet is.

workbook

Gnm.Workbook

r/w/co

The GOffice.workbook in which this sheet lives

zoom-factor

float

r/w/c

The level of zoom used for this sheet.

Signals

Inherited:

GObject.Object (1)

Name

Short Description

detached-from-workbook

Fields

Inherited:

GObject.Object (1)

Name

Type

Access

Description

base

GObject.Object

r

being_constructed

bool

r

being_destructed

bool

r

being_invalidated

bool

r

cell_hash

{object: object}

r

cols

Gnm.ColRowCollection

r

conditions

Gnm.SheetConditionsData

r

convs

Gnm.Conventions

r

deps

Gnm.DepContainer

r

display_formulas

bool

r

display_outlines

bool

r

filters

[object]

r

has_filtered_rows

bool

r

hash_merged

{object: object}

r

hide_col_header

bool

r

hide_grid

bool

r

hide_row_header

bool

r

hide_zero

bool

r

index_in_wb

int

r

is_protected

bool

r

last_zoom_factor_used

float

r

list_merged

[object]

r

max_object_extent

Gnm.CellPos

r

name_case_insensitive

str

r

name_quoted

str

r

name_unquoted

str

r

name_unquoted_collate_key

str

r

names

Gnm.NamedExprCollection

r

outline_symbols_below

bool

r

outline_symbols_right

bool

r

pending_redraw

[object]

r

pending_redraw_src

int

r

print_info

Gnm.PrintInformation

r

priv

Gnm.SheetPrivate

r

rendered_values

Gnm.RenderedValueCollection

r

revive

GOffice.UndoGroup

r

rows

Gnm.ColRowCollection

r

scenarios

[object]

r

sheet_objects

[object]

r

sheet_type

Gnm.SheetType

r

sheet_views

[object]

r

simulation_round

int

r

size

Gnm.SheetSize

r

slicers

[object]

r

solver_parameters

Gnm.SolverParameters

r

sort_setups

{object: object}

r

style_data

Gnm.SheetStyleData

r

tab_color

Gnm.Color

r

tab_text_color

Gnm.Color

r

text_is_rtl

bool

r

tile_top_level

int

r

visibility

Gnm.SheetVisibility

r

workbook

Gnm.Workbook

r

Class Details

class Gnm.Sheet(**kwargs)
Bases:

GObject.Object

Abstract:

No

classmethod apply_style_undo(sr, style)
Parameters:
Returns:

the new GOffice.Undo.

Return type:

GOffice.Undo

classmethod cell_queue_respan(cell)
Parameters:

cell (Gnm.Cell) –

classmethod cell_set_expr(cell, texpr)
Parameters:

Marks the sheet as dirty Clears old spans. Flags status updates Queues recalcs

classmethod clear_region_undo(sr, clear_flags)
Parameters:
Returns:

the new GOffice.Undo.

Return type:

GOffice.Undo

classmethod conditions_share_conditions_add(conds)
Parameters:

conds (Gnm.StyleConditions) –

Returns:

Conditions equivalent to conds, or None if conds had not been seen before.

Return type:

Gnm.StyleConditions or None

classmethod conditions_share_conditions_remove(conds)
Parameters:

conds (Gnm.StyleConditions) –

This notifies the sheet conditions manager that one use of the shared conditions has gone away.

classmethod flag_status_update_cell(cell)
Parameters:

cell (Gnm.Cell) – The cell that has changed.

flag the sheet as requiring an update to the status display if the supplied cell location is the edit Gnm.cursor, or part of the selected region.

Will cause the format Gnm.toolbar, the edit area, and the auto expressions to be updated if appropriate.

classmethod merge_relocate(ri)
Parameters:

ri (Gnm.ExprRelocateInfo) – Descriptor of what is moving.

Returns:

Undo information.

Return type:

pundo: GOffice.Undo

Shifts merged regions that need to move.

classmethod move_range(rinfo, cc)
Parameters:
Returns:

undo object

Return type:

pundo: GOffice.Undo

Move a range as specified in rinfo report warnings to cc. if pundo is non-None, invalidate references to the target region that are being cleared, and store the undo information in pundo. If it is None do NOT INVALIDATE.

classmethod new(wb, name, columns, rows)
Parameters:
  • wb (Gnm.Workbook) – Gnm.Workbook

  • name (str) – The name for the sheet (unquoted).

  • columns (int) – The requested columns number.

  • rows (int) – The requested rows number.

Returns:

the newly allocated sheet.

Return type:

Gnm.Sheet

Create a new Gnm.Sheet of type SHEET_DATA, and associate it with wb. The type cannot be changed later

classmethod new_with_type(wb, name, type, columns, rows)
Parameters:
Returns:

the newly allocated sheet.

Return type:

Gnm.Sheet

Create a new Gnm.Sheet of type type, and associate it with wb. The type cannot be changed later.

classmethod objects_relocate(rinfo, update)
Parameters:
  • rinfo (Gnm.ExprRelocateInfo) – details on what should be moved.

  • update (bool) – Should we do the bound_update now, or leave it for later. if False honour the move_with_cells flag.

Returns:

add dropped objects to ::objects

Return type:

pundo: GOffice.Undo

Uses the relocation info and the anchors to decide whether or not, and how to relocate objects when the grid moves (eg ins/del Gnm.col/Gnm.row).

classmethod style_insdel_colrow(rinfo)
Parameters:

rinfo (Gnm.ExprRelocateInfo) –

Insert of delete style columns/rows.

For the insert case, we stretch the preceding column/Gnm.row into there space we open.

classmethod style_relocate(rinfo)
Parameters:

rinfo (Gnm.ExprRelocateInfo) –

Slide the styles from the origin region to the new position.

classmethod suggest_size(cols, rows)
Parameters:
  • cols (int) – number of columns

  • rows (int) – number of rows

Returns:

cols:

number of columns

rows:

number of rows

Return type:

(cols: int, rows: int)

This function produces a valid sheet size that is reasonable for data of cols columns by rows rows. If possible, this will be a size bigger in both dimensions. However, that is not always possible and when it is not, the suggested will be smaller in one or both directions.

classmethod valid_size(cols, rows)
Parameters:
  • cols (int) –

  • rows (int) –

Return type:

bool

add_sort_setup(key, setup)
Parameters:
apply_border(range, borders)
Parameters:
apply_style(range, style)
Parameters:

A mid level routine that applies the supplied partial style style to the target range and performs the necessary respanning and redrawing.

cell_create(col, row)
Parameters:
Return type:

Gnm.Cell

Creates a new cell and adds it to the sheet hash.

cell_fetch(col, row)
Parameters:
  • col (int) – the cell column

  • row (int) – the cell Gnm.row

Returns:

a Gnm.Cell containing at (col,`row`). If no cell existed at that location before, it is created.

Return type:

Gnm.Cell

cell_foreach(callback, *data)
Parameters:

Call callback with an argument of data for each cell in the sheet

cell_get(col, row)
Parameters:
  • col (int) – the cell column

  • row (int) – the cell Gnm.row

Returns:

a Gnm.Cell, or None if the cell does not exist

Return type:

Gnm.Cell or None

cell_get_value(col, row)
Parameters:
  • col (int) – Source column

  • row (int) – Source Gnm.row

Returns:

the cell’s current GOffice.value. The return GOffice.value will be None only when the cell does not exist.

Return type:

Gnm.Value or None

cell_positions(comments)
Parameters:

comments (bool) – If true, include cells with only comments also.

Returns:

the newly created array

Return type:

[Gnm.EvalPos]

Collects a GLib.PtrArray of Gnm.EvalPos pointers for all cells in a sheet. No particular order should be assumed.

cell_remove(cell, redraw, queue_recalc)
Parameters:

Remove the cell from the web of dependencies of a sheet. Do NOT free the cell, optionally redraw it, optionally queue it for recalc.

cell_set_text(col, row, str)
Parameters:
  • col (int) – Column number

  • row (int) – Row number

  • str (str) – the text to set.

Sets the contents of a cell.

cell_set_value(col, row, v)
Parameters:

Set the GOffice.value of the cell at (col,`row`) to v.

The GOffice.value is rendered and spans are calculated. It queues a redraw and checks to see if the edit region or selection content changed.

cells(r)
Parameters:

r (Gnm.Range or None) – a Gnm.Range

Returns:

the cells array.

Return type:

[Gnm.Cell]

Retrieves an array of all cells inside r.

cells_count()
Return type:

int

Returns the number of cells with content in the current GOffice.workbook.

clear_region(start_col, start_row, end_col, end_row, clear_flags, cc)
Parameters:
  • start_col (int) – Starting column

  • start_row (int) – Starting Gnm.row

  • end_col (int) – Ending column

  • end_row (int) – Ending Gnm.row

  • clear_flags (Gnm.SheetClearFlags) – flags indicating what to clear

  • cc (GOffice.CmdContext or None) – command context for error reporting

Clears a region of cells, formats, object, etc. as indicated by clear_flags.

col_fetch(col)
Parameters:

col (int) – Column number

Returns:

The Gnm.ColRowInfo for column col. This result will not be the default Gnm.ColRowInfo and may be changed.

Return type:

Gnm.ColRowInfo

col_get(col)
Parameters:

col (int) – Column number

Returns:

A Gnm.ColRowInfo for the column, or None if none has been allocated yet.

Return type:

Gnm.ColRowInfo or None

col_get_default_size_pixels()
Return type:

int

col_get_default_size_pts()
Returns:

the default number of pts in a column, including margins. This function returns the raw sum, no rounding etc.

Return type:

float

col_get_distance_pixels(from_, to)
Parameters:
  • from (int) – Starting column

  • to (int) – Ending column, not inclusive

Returns:

the number of pixels between columns from and to measured from the upper left corner.

Return type:

int

col_get_distance_pts(from_, to)
Parameters:
  • from (int) – Starting column

  • to (int) – Ending column, not inclusive

Returns:

the number of points between columns from and to measured from the upper left corner.

Return type:

float

col_get_info(col)
Parameters:

col (int) – Column number

Returns:

The Gnm.ColRowInfo for column col. This may be the default Gnm.ColRowInfo for columns and should not be changed.

Return type:

Gnm.ColRowInfo

col_is_hidden(col)
Parameters:

col (int) –

Return type:

bool

col_set_default_size_pixels(width_pixels)
Parameters:

width_pixels (int) –

col_set_default_size_pts(width_pts)
Parameters:

width_pts (float) –

col_set_size_pixels(col, width_pixels, set_by_user)
Parameters:
  • col (int) –

  • width_pixels (int) –

  • set_by_user (bool) –

col_set_size_pts(col, width_pts, set_by_user)
Parameters:
  • col (int) – The Gnm.col

  • width_pts (float) – The desired width in pts

  • set_by_user (bool) – True if this was done by a user (ie, user manually set the width)

Sets width of a Gnm.col in pts, INCLUDING left and right margins, and the far grid line. This is a low level internal routine. It does NOT redraw, or reposition objects.

col_size_fit_pixels(col, srow, erow, ignore_strings)
Parameters:
  • col (int) – the column that we want to query

  • srow (int) – starting Gnm.row.

  • erow (int) – ending Gnm.row.

  • ignore_strings (bool) – skip cells containing string values. Currently this flags doubles as an indicator that numeric cells should only cause a widening when they would otherwise cause “####” to be displayed.

Returns:

Maximum size in pixels INCLUDING margins and grid lines or 0 if there are no cells.

Return type:

int

This routine computes the ideal size for the column to make the contents all cells in the column visible.

colrow_can_group(r, is_cols)
Parameters:
Returns:

True if the cols/rows in r.start -> r.end can be grouped, False otherwise. You can invert the result if you need to find out if a group can be ungrouped.

Return type:

bool

colrow_copy_info(colrow, is_cols, cri)
Parameters:
colrow_fetch(colrow, is_cols)
Parameters:
  • colrow (int) –

  • is_cols (bool) –

Return type:

Gnm.ColRowInfo

colrow_foreach(is_cols, first, last, callback, *user_data)
Parameters:
  • is_cols (bool) – True for columns, False for rows.

  • first (int) – start position (inclusive)

  • last (int) – stop position (inclusive), -1 meaning end-of-sheet

  • callback (Gnm.ColRowHandler) – A callback function which should return True to stop the iteration.

  • user_data (object or None) – A baggage pointer.

Return type:

bool

Iterates through the existing rows or columns within the range supplied. If a callback returns True, iteration stops.

colrow_get(colrow, is_cols)
Parameters:
  • colrow (int) –

  • is_cols (bool) –

Return type:

Gnm.ColRowInfo

colrow_get_default(is_cols)
Parameters:

is_cols (bool) – True for columns, False for rows.

Returns:

the default Gnm.ColRowInfo.

Return type:

Gnm.ColRowInfo

colrow_get_distance_pixels(is_cols, from_, to)
Parameters:
  • is_cols (bool) – True for columns, False for rows.

  • from (int) – Starting column/Gnm.row

  • to (int) – Ending column/Gnm.row, not inclusive

Returns:

the number of pixels between columns/rows from and to measured from the upper left corner.

Return type:

int

colrow_get_info(colrow, is_cols)
Parameters:
  • colrow (int) –

  • is_cols (bool) –

Return type:

Gnm.ColRowInfo

colrow_group_ungroup(r, is_cols, inc)
Parameters:
Return type:

bool

colrow_gutter(is_cols, max_outline)
Parameters:

Set the maximum outline levels for cols or rows.

colrow_optimize()
conditions_add(r, style)
Parameters:
conditions_dump()
conditions_init()
Parameters:
conditions_remove(r, style)
Parameters:
conditions_simplify()
conditions_uninit()
date_conv()
Returns:

the date conventions in effect for the sheet. This is purely a convenience function to access the conventions used for the GOffice.workbook. All sheets in a GOffice.workbook share the same date conventions.

Return type:

GOffice.DateConventions

delete_cols(col, count, cc)
Parameters:
  • col (int) – At which position we want to start deleting columns

  • count (int) – The number of columns to be deleted

  • cc (GOffice.CmdContext) – The command context

Returns:

pundo:

(transfer full): (allow-none): undo closure

Return type:

(bool, pundo: GOffice.Undo)

delete_rows(row, count, cc)
Parameters:
  • row (int) – At which position we want to start deleting rows

  • count (int) – The number of rows to be deleted

  • cc (GOffice.CmdContext) – The command context

Returns:

pundo:

(transfer full): (allow-none): undo closure

Return type:

(bool, pundo: GOffice.Undo)

destroy_contents()
dup()
Returns:

the newly allocated Gnm.Sheet.

Return type:

Gnm.Sheet

Create a duplicate sheet.

filter_at_pos(pos)
Parameters:

pos (Gnm.CellPos) – location to query

Returns:

Gnm.Filter covering pos.

Return type:

Gnm.Filter or None

filter_can_be_extended(f, r)
Parameters:
Returns:

Gnm.Range

Return type:

Gnm.Range or None

filter_insdel_colrow(is_cols, is_insert, start, count)
Parameters:
  • is_cols (bool) – True for columns, False for rows.

  • is_insert (bool) – True for insert, False for delete.

  • start (int) – Starting column or Gnm.row.

  • count (int) – Number of columns or rows.

Returns:

location to store undo closures.

Return type:

pundo: GOffice.Undo

Adjust filters as necessary to handle Gnm.col/Gnm.row insertions and deletions

filter_intersect_rows(from_, to)
Parameters:
  • from (int) – starting Gnm.row number

  • to (int) – ending Gnm.row number

Returns:

the Gnm.Filter, if any, that intersects the rows from to to.

Return type:

Gnm.Filter or None

find_boundary_horizontal(col, move_row, base_row, count, jump_to_boundaries)
Parameters:
  • col (int) – The column from which to begin searching.

  • move_row (int) – The Gnm.row in which to search for the edge of the range.

  • base_row (int) – The height of the area being moved.

  • count (int) – units to extend the selection vertically

  • jump_to_boundaries (bool) – Jump to range boundaries.

Returns:

the column index.

Return type:

int

Calculate the column index for the column which is count units from start_col doing bounds checking. If jump_to_boundaries is True then count must be 1 and the jump is to the edge of the logical range.

This routine implements the logic necessary for ctrl-arrow style movement. That is more complicated than simply finding the last in a list of cells with content. If you are at the end of a range it will find the start of the next. Make sure that is the sort of behavior you want before calling this.

find_boundary_vertical(move_col, row, base_col, count, jump_to_boundaries)
Parameters:
  • move_col (int) – The Gnm.col in which to search for the edge of the range.

  • row (int) – The Gnm.row from which to begin searching.

  • base_col (int) – The width of the area being moved.

  • count (int) – units to extend the selection vertically

  • jump_to_boundaries (bool) – Jump to range boundaries.

Returns:

the Gnm.row index.

Return type:

int

Calculate the Gnm.row index for the Gnm.row which is count units from start_row doing bounds checking. If jump_to_boundaries is True then count must be 1 and the jump is to the edge of the logical range.

This routine implements the logic necessary for ctrl-arrow style movement. That is more complicated than simply finding the last in a list of cells with content. If you are at the end of a range it will find the start of the next. Make sure that is the sort of behavior you want before calling this.

find_sort_setup(key)
Parameters:

key (str) –

Returns:

the found sort setup or None.

Return type:

object or None

flag_recompute_spans()

Flag the sheet as requiring a full span recomputation the next time Gnm.Sheet.update is called.

flag_status_update_range(range)
Parameters:

range (Gnm.Range or None) – Gnm.Range, or None for full sheet

flag the sheet as requiring an update to the status display if the supplied cell location contains the edit Gnm.cursor, or intersects of the selected region.

Will cause the format Gnm.toolbar, the edit area, and the auto expressions to be updated if appropriate.

flag_style_update_range(range)
Parameters:

range (Gnm.Range) – the range that is changing.

Flag format changes that will require updating the format indicators.

foreach_cell_in_range(flags, r, callback, closure)
Parameters:
Returns:

the GOffice.value returned by the callback, which can be: non-None on error, or VALUE_TERMINATE if some invoked routine requested to stop (by returning non-None).

NOTE: between 0.56 and 0.57, the traversal order changed. The order is now

1 2 3 4 5 6 7 8 9

(This appears to be the order in which XL looks at the values of ranges.) If your code depends on any particular ordering, please add a very visible Gnm.comment near the call.

Return type:

Gnm.Value

For each existing cell in the range specified, invoke the callback routine. If the only_existing flag is passed, then callbacks are only invoked for existing cells.

Note: this function does not honour the Gnm.CellIterFlags.IGNORE_SUBTOTAL flag.

foreach_cell_in_region(flags, start_col, start_row, end_col, end_row, callback, closure)
Parameters:
  • flags (Gnm.CellIterFlags) –

  • start_col (int) – Starting column

  • start_row (int) – Starting Gnm.row

  • end_col (int) – Ending column, -1 meaning last

  • end_row (int) – Ending Gnm.row, -1 meaning last

  • callback (Gnm.CellIterFunc) – #CellFilterFunc

  • closure (object or None) – user data.

Returns:

the GOffice.value returned by the callback, which can be: non-None on error, or VALUE_TERMINATE if some invoked routine requested to stop (by returning non-None).

NOTE: between 0.56 and 0.57, the traversal order changed. The order is now

1 2 3 4 5 6 7 8 9

(This appears to be the order in which XL looks at the values of ranges.) If your code depends on any particular ordering, please add a very visible Gnm.comment near the call.

Return type:

Gnm.Value

For each existing cell in the range specified, invoke the callback routine. If the only_existing flag is passed, then callbacks are only invoked for existing cells.

Note: this function does not honour the Gnm.CellIterFlags.IGNORE_SUBTOTAL flag.

foreach_name(func, *data)
Parameters:

Executes func for each name in self.

freeze_object_views(qfreeze)
Parameters:

qfreeze (bool) –

get_cells_extent()
Returns:

the range.

Return type:

Gnm.Range

Calculates the area occupied by cells, including empty cells.

get_comment(pos)
Parameters:

pos (Gnm.CellPos) – Gnm.CellPos const *

Returns:

the Gnm.comment or None.

Return type:

Gnm.Comment

If there is a cell Gnm.comment at pos in self return it.

Caller does get a reference to the object if it exists.

get_conventions()
Return type:

Gnm.Conventions

get_extent(spans_and_merges_extend, include_hidden)
Parameters:
  • spans_and_merges_extend (bool) – optionally extend region for spans and merges.

  • include_hidden (bool) – whether to include the content of hidden cells.

Returns:

the range.

Return type:

Gnm.Range

calculates the area occupied by cell data.

NOTE: When spans_and_merges_extend is True, this function will calculate all spans. That might be expensive.

NOTE: This refers to *visible* contents. Cells with empty values, including formulas with such values, are *ignored.

get_nominal_printarea()
Return type:

Gnm.Range

get_printarea(include_styles, ignore_printarea)
Parameters:
  • include_styles (bool) –

  • ignore_printarea (bool) –

Return type:

Gnm.Range

get_size()
Returns:

the sheet size.

Return type:

Gnm.SheetSize

get_size2(wb)
Parameters:

wb (Gnm.Workbook or None) – GOffice.workbook.

Returns:

the sheet size.

Return type:

Gnm.SheetSize

Determines the sheet size, either of self if that is non-None or of wb's default sheet. One of self and wb must be non-None.

get_sort_setups()
Returns:

the sort setups for self.

Return type:

{object: object}

get_view(wbv)
Parameters:

wbv (Gnm.WorkbookView) –

Returns:

the view.

Return type:

Gnm.SheetView

Find the Gnm.SheetView corresponding to the supplied wbv.

guess_data_range(region)
Parameters:

region (Gnm.Range) – Gnm.Range

Makes a guess at the logical range containing region and returns the possibly expanded result in region. The range is also expanded upwards.

guess_region(region)
Parameters:

region (Gnm.Range) – Gnm.Range

Makes a guess at the logical containing region and returns the possibly expanded result in region.

Parameters:

pos (Gnm.CellPos) – #GcmCellPos

Returns:

the found Gnm.HLink.

Return type:

Gnm.HLink or None

insert_cols(col, count, cc)
Parameters:
  • col (int) – At which position we want to insert

  • count (int) – The number of columns to be inserted

  • cc (GOffice.CmdContext) – The command context

Returns:

pundo:

(transfer full): (allow-none): undo closure

Return type:

(bool, pundo: GOffice.Undo)

insert_rows(row, count, cc)
Parameters:
  • row (int) – At which position we want to insert

  • count (int) – The number of rows to be inserted

  • cc (GOffice.CmdContext) – The command context

Returns:

pundo:

(transfer full): (allow-none): undo closure

Return type:

(bool, pundo: GOffice.Undo)

is_cell_empty(col, row)
Parameters:
Return type:

bool

is_region_empty(r)
Parameters:

r (Gnm.Range) – region to check

Returns:

True if the specified region of the self does not contain any cells

Return type:

bool

mark_dirty()
merge_add(r, clear, cc)
Parameters:
  • r (Gnm.Range) – The region to merge

  • clear (bool) – should the non-corner content of the region be cleared and the style from the corner applied.

  • cc (GOffice.CmdContext or None) – the calling context

Return type:

bool

Add a range to the list of merge targets. Checks for array splitting returns True if there was an error. Queues a respan. Only queues a redraw if clear is True.

merge_contains_pos(pos)
Parameters:

pos (Gnm.CellPos) – Position to look for a merged range.

Returns:

the merged range covering pos, or None if pos is not within a merged region.

Return type:

Gnm.Range or None

merge_find_bounding_box(r)
Parameters:

r (Gnm.Range) – the range to extend

Extends r such that no merged range is split by its boundary.

merge_get_adjacent(pos)
Parameters:

pos (Gnm.CellPos) – the cell to test for adjacent regions.

Returns:

left:

the return for a region on the left

right:

the return for a region on the right

Return type:

(left: Gnm.Range, right: Gnm.Range)

Returns the nearest regions to either side of pos.

merge_get_overlap(r)
Parameters:

r (Gnm.Range) –

Returns:

a list of the merged regions that overlap the target region. The list is ordered from top to bottom and RIGHT TO LEFT (by start coord).

Return type:

[Gnm.Range]

merge_is_corner(pos)
Parameters:

pos (Gnm.CellPos) – cellpos if top left corner

Returns:

a merged Gnm.Range covering pos if it is the top-left corner of a merged region.

Return type:

Gnm.Range

merge_remove(r)
Parameters:

r (Gnm.Range) – The region

Returns:

True if there was an error.

Return type:

bool

Remove a merged range. Queues a redraw.

names_check(r)
Parameters:

r (Gnm.Range) – Gnm.Range

Returns:

The name of a Gnm.NamedExpr if self!`r` is the target of a named range.

Preference is given to GOffice.workbook scope over sheet.

Return type:

str or None

objects_clear(r, t)
Parameters:
Return type:

pundo: GOffice.Undo or None

Removes the objects in the region.

objects_dup(dst, range)
Parameters:

Clones the objects of the src sheet and attaches them into the dst sheet

objects_get(r, t)
Parameters:
Returns:

a list containing all objects of exactly the specified type (inheritance does not GOffice.count) that are completely contained in r.

Return type:

[Gnm.SheetObject]

queue_redraw_range(range)
Parameters:

range (Gnm.Range) – range to redraw

This queues a redraw for the indicated range. The redraw will happen when Gnumeric returns to the gui main loop.

queue_respan(start_row, end_row)
Parameters:
  • start_row (int) –

  • end_row (int) –

queues a span generation for the selected rows. the caller is responsible for queuing a redraw

range_bounding_box(r)
Parameters:

r (Gnm.Range) –

range_calc_spans(r, flags)
Parameters:

This is used to re-calculate cell dimensions and re-render a cell’s text. eg. if a format has changed we need to re-render the cached version of the rendered text in the cell.

range_contains_merges_or_arrays(r, cc, cmd, merges, arrays)
Parameters:
Returns:

True if the target region self!`r` contains any merged regions or arrays.

Return type:

bool

Check to see if the target region self!`r` contains any merged regions or arrays. Report an error to the cc if it is supplied.

range_has_heading(src, top, ignore_styles)
Parameters:
Returns:

True if src seems to have a heading

Return type:

bool

Checks for a header Gnm.row in self!`src`. If top is true it looks for a header Gnm.row from the top and if false it looks for a header Gnm.col from the left

range_splits_array(r, ignore, cc, cmd)
Parameters:
Returns:

True if an array would be split.

Return type:

bool

Check the outer edges of range self!`r` to ensure that if an array is within it then the entire array is within the range. ignore is useful when src and dest ranges may overlap.

range_splits_region(r, ignore, cc, cmd)
Parameters:
  • r (Gnm.Range) – The range whose boundaries are checked

  • ignore (Gnm.Range) – An optional range in which it is ok to have arrays and merges

  • cc (GOffice.CmdContext) – The context that issued the command

  • cmd (str) – The translated command name.

Returns:

whether any arrays or merged regions will be split.

Return type:

bool

A utility to see whether moving the range r will split any arrays or merged regions.

range_trim(r, cols, rows)
Parameters:
  • r (Gnm.Range) – range to trim empty cells from

  • cols (bool) – trim from right

  • rows (bool) – trim from bottom

Returns:

True if the range was totally empty.

Return type:

bool

This removes empty rows/cols from the right hand or bottom edges of the range depending on the GOffice.value of cols or rows.

range_unrender(r)
Parameters:

r (Gnm.Range or None) – range to unrender

Unrenders all cells in the given range. If r is None, the all cells in the sheet are unrendered.

ranges_split_region(ranges, cc, cmd)
Parameters:
  • ranges ([Gnm.Range]) – A list of ranges to check.

  • cc (GOffice.CmdContext) – The context that issued the command

  • cmd (str) – The translated command name.

Returns:

whether any arrays or merged regions will be split.

Return type:

bool

A utility to see whether moving any of the ranges ranges will split any arrays or merged regions.

recompute_spans_for_col(col)
Parameters:

col (int) – The column that changed

This routine recomputes the column span for the cells that touches the column.

redraw_all(header)
Parameters:

header (bool) –

redraw_range(range)
Parameters:

range (Gnm.Range) – range to redraw

Redraw the indicated range, or at least the visible parts of it.

redraw_region(start_col, start_row, end_col, end_row)
Parameters:
  • start_col (int) –

  • start_row (int) –

  • end_col (int) –

  • end_row (int) –

region_queue_recalc(range)
Parameters:

range (Gnm.Range or None) – Range

Queues things that depend on self!`range` for recalc.

If range is None the entire sheet is used.

resize(cols, rows, cc)
Parameters:
Returns:

the newly allocated GOffice.Undo.

perr:

will be True on error.

Return type:

(GOffice.Undo, perr: bool)

row_fetch(row)
Parameters:

row (int) – Row number

Returns:

The Gnm.ColRowInfo for Gnm.row row. This result will not be the default Gnm.ColRowInfo and may be changed.

Return type:

Gnm.ColRowInfo

row_get(row)
Parameters:

row (int) – Row number

Returns:

A Gnm.ColRowInfo for the Gnm.row, or None if none has been allocated yet.

Return type:

Gnm.ColRowInfo or None

row_get_default_size_pixels()
Return type:

int

row_get_default_size_pts()
Returns:

the default number of units in a Gnm.row, including margins. This function returns the raw sum, no rounding etc.

Return type:

float

row_get_distance_pixels(from_, to)
Parameters:
  • from (int) – Starting Gnm.row

  • to (int) – Ending Gnm.row, not inclusive

Returns:

the number of pixels between rows from and to measured from the upper left corner.

Return type:

int

row_get_distance_pts(from_, to)
Parameters:
  • from (int) – Starting Gnm.row

  • to (int) – Ending Gnm.row, not inclusive

Returns:

the number of points between rows from and to measured from the upper left corner.

Return type:

float

row_get_info(row)
Parameters:

row (int) – column number

Returns:

The Gnm.ColRowInfo for Gnm.row row. This may be the default Gnm.ColRowInfo for rows and should not be changed.

Return type:

Gnm.ColRowInfo

row_is_hidden(row)
Parameters:

row (int) –

Return type:

bool

row_set_default_size_pixels(height_pixels)
Parameters:

height_pixels (int) –

row_set_default_size_pts(height_pts)
Parameters:

height_pts (float) –

row_set_size_pixels(row, height_pixels, set_by_user)
Parameters:
  • row (int) – The Gnm.row

  • height_pixels (int) – The desired height

  • set_by_user (bool) – True if this was done by a user (ie, user manually set the width)

Sets height of a Gnm.row in pixels, INCLUDING top and bottom margins, and the lower grid line.

row_set_size_pts(row, height_pts, set_by_user)
Parameters:
  • row (int) – The Gnm.row

  • height_pts (float) – The desired height in pts

  • set_by_user (bool) – True if this was done by a user (ie, user manually set the height)

Sets height of a Gnm.row in pts, INCLUDING top and bottom margins, and the lower grid line. This is a low level internal routine. It does NOT redraw, or reposition objects.

row_size_fit_pixels(row, scol, ecol, ignore_strings)
Parameters:
  • row (int) – the Gnm.row that we want to query

  • scol (int) – starting column.

  • ecol (int) – ending column.

  • ignore_strings (bool) – skip cells containing string values.

Returns:

Maximum size in pixels INCLUDING margins and grid lines or 0 if there are no cells.

Return type:

int

This routine computes the ideal size for the Gnm.row to make all data fit properly.

scenario_add(sc)
Parameters:

sc (Gnm.Scenario) – Gnm.Scenario

scenario_find(name)
Parameters:

name (str) – the scenario name.

Returns:

the found scenario, or None.

Return type:

Gnm.Scenario or None

scenario_remove(sc)
Parameters:

sc (Gnm.Scenario) –

scrollbar_config()
selection_is_allowed(pos)
Parameters:

pos (Gnm.CellPos) –

Return type:

bool

set_outline_direction(is_cols)
Parameters:

is_cols (bool) – True for columns, False for rows.

When changing the placement of outline collapse markers the flags need to be recomputed.

set_solver_params(param)
Parameters:

param (Gnm.SolverParameters) –

slicers_at_pos(pos)
Parameters:

pos (Gnm.CellPos) – Gnm.CellPos

Returns:

None or the Gnm.SheetSlicer in self that overlaps with pos.

Return type:

Gnm.SheetSlicer

style_apply_border(range, borders)
Parameters:

When a user applies a border to a region we attempt to remove the border from the opposing side to avoid overlapping border specifications. eg if we apply a top border to a range, we would clear the bottom border of the range offset upwards.

style_apply_col(col, style)
Parameters:

NOTE: This is a simple wrapper for now. When we support Gnm.col/Gnm.row styles it will make life easier.

Apply a partial style to a full Gnm.col.

style_apply_pos(col, row, style)
Parameters:

Apply a partial style to a single cell

style_apply_row(row, style)
Parameters:

NOTE: This is a simple wrapper for now. When we support Gnm.col/Gnm.row styles it will make life easier.

Apply a partial style to a full Gnm.col.

style_collect_conditions(r)
Parameters:

r (Gnm.Range or None) – Range to scan

Returns:

a list of areas with conditionals. Note that when a range is given, the resulting ranges are relative to the input range.

Return type:

[object]

Parameters:

r (Gnm.Range or None) – Range to scan

Returns:

a list of areas with hyperlinks. Note that when a range is given, the resulting ranges are relative to the input range.

Return type:

[object]

style_collect_validations(r)
Parameters:

r (Gnm.Range or None) – Range to scan

Returns:

a list of areas with validation or input message. Note that when a range is given, the resulting ranges are relative to the input range.

Return type:

[object]

style_default()
Returns:

default style for the sheet.

Return type:

Gnm.Style

style_find(st)
Parameters:

st (Gnm.Style) – a style

Returns:

the new style.

Return type:

Gnm.Style

Looks up a style from the sheets collection. Linking if necessary.

style_find_conflicts(r, style)
Parameters:
Returns:

bitmask of conflicts

Return type:

(int, style: Gnm.Style, borders: [Gnm.Border])

style_foreach(func, *user_data)
Parameters:

Executes func for each style in the sheet.

style_get(col, row)
Parameters:
  • col (int) – Column number

  • row (int) – Gnm.row number

Returns:

find the fully qualified style applicable to the specified cell position

Return type:

Gnm.Style

style_get_auto_pattern_color()
Returns:

the color for rendering auto colored patterns in this sheet.

Return type:

Gnm.Color

style_get_extent(r)
Parameters:

r (Gnm.Range) – starting range and resulting range

Returns:

starting range and resulting range

Return type:

r: Gnm.Range

A simple implementation that finds the smallest range containing all visible styles and containing r.

style_get_nondefault_extent(extent, src, col_defaults)
Parameters:
Returns:

extent

Return type:

extent: Gnm.Range

Extends extent so that it covers any non-default style used.

style_get_nondefault_rows(col_defaults)
Parameters:

col_defaults ([Gnm.Style]) – defaults styles

Returns:

GLib.ByteArray with one element per Gnm.row. An element is True if the Gnm.row uses a non-default style.

Return type:

bytes

style_get_range(r)
Parameters:

r (Gnm.Range or None) – Range to scan

Return type:

[object]

Get a list of rectangles and their associated styles. Note that when a range is given, the resulting ranges are relative to the input range.

style_get_row(sr)
Parameters:

sr (Gnm.StyleRow) – Gnm.StyleRow

A utility routine which efficiently retrieves a range of styles within a Gnm.row. It also merges adjacent borders as necessary.

style_get_row2(row)
Parameters:

row (int) –

Return type:

Gnm.Style

style_init()
style_is_default(r, col_defaults)
Parameters:
Returns:

True if all styles in the given range are default column styles.

Return type:

bool

style_most_common(is_col)
Parameters:

is_col (bool) – if True, look for common styles in columns; if False, look in rows.

Returns:

an array of styles describing the most common styles, one per column or Gnm.row.

Return type:

[Gnm.Style]

style_optimize()
style_range_foreach(r, func, *user_data)
Parameters:
Parameters:

r (Gnm.Range) – Gnm.Range to search for links

Returns:

the found #GmHLink if any.

Return type:

Gnm.HLink or None

Utility routine that checks to see if a region contains at least ones hyperlink and returns the first one it finds.

style_resize(cols, rows)
Parameters:
  • cols (int) –

  • rows (int) –

style_set_auto_pattern_color(grid_color)
Parameters:

grid_color (Gnm.Color) – The color

Set the color for rendering auto colored patterns in this sheet.

style_set_list(corner, l, range_modify, *data)
Parameters:
Return type:

Gnm.SpanCalcFlags

Overwrites the styles of the ranges given by corner with the content of list. Optionally transposing the ranges

style_set_pos(col, row, style)
Parameters:
  • col (int) – Column number

  • row (int) – Row number

  • style (Gnm.Style) –

Change the complete style for a single cell.

style_set_range(range, style)
Parameters:

Change the complete style for a region.

style_shutdown()
Parameters:

st (Gnm.Style) –

style_update_grid_color(context)
Parameters:

context (Gtk.StyleContext) –

This function updates the color of Gnm.Style.border_none when the sheet to be rendered is known. Gnm.Style.border_none tells how to render the grid. Because the grid color may be different for different sheets, the functions which render the grid call this function first. The rule for selecting the grid color, which is the same as in Excel, is: - if the auto pattern color is default (which is black), the grid color is gray, as returned by Gnm.Style.color_grid (). - otherwise, the auto pattern color is used for the grid.

update()

Should be called after a logical command has finished processing to request redraws for any pending events, and to update the various status regions

update_only_grid()

Should be called after a logical command has finished processing to request redraws for any pending events

Signal Details

Gnm.Sheet.signals.detached_from_workbook(sheet, object)
Signal Name:

detached-from-workbook

Flags:

RUN_LAST

Parameters:

Property Details

Gnm.Sheet.props.columns
Name:

columns

Type:

int

Default Value:

256

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Columns number in the sheet

Gnm.Sheet.props.conventions
Name:

conventions

Type:

Gnm.Conventions

Default Value:

None

Flags:

READABLE, WRITABLE

How to format displayed expressions, (A1 vs R1C1, function names, …)

Gnm.Sheet.props.display_column_header
Name:

display-column-header

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Control whether column headers are shown.

Gnm.Sheet.props.display_formulas
Name:

display-formulas

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Control whether formulæ are shown instead of values.

Gnm.Sheet.props.display_grid
Name:

display-grid

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

Control whether the grid is shown.

Gnm.Sheet.props.display_outlines
Name:

display-outlines

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

Control whether outlines are shown.

Gnm.Sheet.props.display_outlines_below
Name:

display-outlines-below

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

Control whether outline symbols are shown below.

Gnm.Sheet.props.display_outlines_right
Name:

display-outlines-right

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

Control whether outline symbols are shown to the right.

Gnm.Sheet.props.display_row_header
Name:

display-row-header

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Control whether Gnm.row headers are shown.

Gnm.Sheet.props.display_zeros
Name:

display-zeros

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

Control whether zeros are shown are blanked out.

Gnm.Sheet.props.name
Name:

name

Type:

str

Default Value:

None

Flags:

READABLE, WRITABLE

The name of the sheet.

Gnm.Sheet.props.protected
Name:

protected

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Gnm.Sheet is protected.

Gnm.Sheet.props.protected_allow_cell_formatting
Name:

protected-allow-cell-formatting

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Allow cell format changes while a sheet is protected

Gnm.Sheet.props.protected_allow_column_formatting
Name:

protected-allow-column-formatting

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Allow column formatting while a sheet is protected

Gnm.Sheet.props.protected_allow_delete_columns
Name:

protected-allow-delete-columns

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Allow columns to be deleted while a sheet is protected

Gnm.Sheet.props.protected_allow_delete_rows
Name:

protected-allow-delete-rows

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Allow rows to be deleted while a sheet is protected

Gnm.Sheet.props.protected_allow_edit_auto_filters
Name:

protected-allow-edit-auto-filters

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Allow auto filters to be edited while a sheet is protected

Gnm.Sheet.props.protected_allow_edit_objects
Name:

protected-allow-edit-objects

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Allow objects to be edited while a sheet is protected

Gnm.Sheet.props.protected_allow_edit_pivottable
Name:

protected-allow-edit-pivottable

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Allow pivottable to be edited while a sheet is protected

Gnm.Sheet.props.protected_allow_edit_scenarios
Name:

protected-allow-edit-scenarios

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Allow scenarios to be edited while a sheet is protected

Gnm.Sheet.props.protected_allow_insert_columns
Name:

protected-allow-insert-columns

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Allow columns to be inserted while a sheet is protected

Name:

protected-allow-insert-hyperlinks

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Allow hyperlinks to be inserted while a sheet is protected

Gnm.Sheet.props.protected_allow_insert_rows
Name:

protected-allow-insert-rows

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Allow rows to be inserted while a sheet is protected

Gnm.Sheet.props.protected_allow_row_formatting
Name:

protected-allow-row-formatting

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Allow Gnm.row formatting while a sheet is protected

Gnm.Sheet.props.protected_allow_select_locked_cells
Name:

protected-allow-select-locked-cells

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

Allow the user to select locked cells while a sheet is protected

Gnm.Sheet.props.protected_allow_select_unlocked_cells
Name:

protected-allow-select-unlocked-cells

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE

Allow the user to select unlocked cells while a sheet is protected

Gnm.Sheet.props.protected_allow_sort_ranges
Name:

protected-allow-sort-ranges

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Allow ranges to be sorted while a sheet is protected

Gnm.Sheet.props.rows
Name:

rows

Type:

int

Default Value:

65536

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Rows number in the sheet

Gnm.Sheet.props.sheet_type
Name:

sheet-type

Type:

Gnm.SheetType

Default Value:

Gnm.SheetType.DATA

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

Which type of sheet this is.

Gnm.Sheet.props.tab_background
Name:

tab-background

Type:

Gnm.Color

Default Value:

None

Flags:

READABLE, WRITABLE

The background color of the tab.

Gnm.Sheet.props.tab_foreground
Name:

tab-foreground

Type:

Gnm.Color

Default Value:

None

Flags:

READABLE, WRITABLE

The foreground color of the tab.

Gnm.Sheet.props.text_is_rtl
Name:

text-is-rtl

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

Text goes from right to left.

Gnm.Sheet.props.use_r1c1
Name:

use-r1c1

Type:

bool

Default Value:

False

Flags:

READABLE, WRITABLE

How to format displayed expressions, (a convenience api)

Gnm.Sheet.props.visibility
Name:

visibility

Type:

Gnm.SheetVisibility

Default Value:

Gnm.SheetVisibility.VISIBLE

Flags:

READABLE, WRITABLE

How visible the sheet is.

Gnm.Sheet.props.workbook
Name:

workbook

Type:

Gnm.Workbook

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT_ONLY

The GOffice.workbook in which this sheet lives

Gnm.Sheet.props.zoom_factor
Name:

zoom-factor

Type:

float

Default Value:

1.0

Flags:

READABLE, WRITABLE, CONSTRUCT

The level of zoom used for this sheet.