ooodev.format.calc.modify.page.sheet package

Module contents

class ooodev.format.calc.modify.page.sheet.Order(*, top_btm=None, first_pg=None, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Bases: CellStyleBase

Page Style Order.

New in version 0.9.0.

__init__(*, top_btm=None, first_pg=None, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Constructor

Parameters:
  • top_btm (bool, optional) – Specifies page order. True for Top to Bottom, then right, False for Left to right then down.

  • first_pg (int, optional) – Specifies first page number. Set to 0 for no page number.

  • style_name (CalcStylePageKind, str, optional) – Specifies the Page Style that instance applies to. Default is Default Page Style.

  • style_family (str, optional) – Style family. Default PageStyles.

Return type:

None

classmethod from_style(doc, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Gets instance from Document.

Parameters:
  • doc (object) – UNO Document Object.

  • style_name (CalcStylePageKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.

  • style_family (str, optional) – Style family. Default PageStyles.

Raises:

NotSupportedError – If obj is not supported.

Returns:

Order instance from document properties.

Return type:

Order

property prop_first_pg: int | None

Gets/Sets first page number. Set to 0 for no page number.

Return type:

int | None

property prop_top_btm: bool | None

Gets/Sets page order. True for Top to Bottom, then right, False for Left to right then down.

Return type:

bool | None

class ooodev.format.calc.modify.page.sheet.Printing(*, header=None, grid=None, comment=None, obj_img=None, chart=None, drawing=None, formula=None, zero_value=None, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Bases: CellStyleBase

Page Style Order.

New in version 0.9.0.

__init__(*, header=None, grid=None, comment=None, obj_img=None, chart=None, drawing=None, formula=None, zero_value=None, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Constructor

Parameters:
  • header (bool, optional) – Specifies if headers are printed.

  • grid (bool, optional) – Specifies if grids are printed.

  • comment (bool, optional) – Specifies if comments are printed.

  • obj_img (bool, optional) – Specifies if objects and images are printed.

  • chart (bool, optional) – Specifies if charts are printed.

  • drawing (bool, optional) – Specifies if drawings are printed.

  • formula (bool, optional) – Specifies if formulas are printed.

  • zero_value (bool, optional) – Specifies if zero values are printed.

  • style_name (CalcStylePageKind, str, optional) – Specifies the Page Style that instance applies to. Default is Default Page Style.

  • style_family (str, optional) – Style family. Default PageStyles.

Return type:

None

classmethod from_style(doc, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Gets instance from Document.

Parameters:
  • doc (object) – UNO Document Object.

  • style_name (CalcStylePageKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.

  • style_family (str, optional) – Style family. Default PageStyles.

Raises:

NotSupportedError – If obj is not supported.

Returns:

Printing instance from document properties.

Return type:

Printing

property prop_chart: bool | None

Gets/Sets Print Charts.

Return type:

bool | None

property prop_comment: bool | None

Gets/Sets Print Comments.

Return type:

bool | None

property prop_drawing: bool | None

Gets/Sets Print Drawing.

Return type:

bool | None

property prop_formula: bool | None

Gets/Sets Print Formulas.

Return type:

bool | None

property prop_grid: bool | None

Gets/Sets Print Grid.

Return type:

bool | None

property prop_header: bool | None

Gets/Sets Print Headers

Return type:

bool | None

property prop_obj_img: bool | None

Gets/Sets Print Object/images.

Return type:

bool | None

property prop_zero_value: bool | None

Gets/Sets Print Zero Values.

Return type:

bool | None

class ooodev.format.calc.modify.page.sheet.ScaleNumOfPages(*, pages=1, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Bases: CellStyleBase

Page Style Shrink Page Range.

New in version 0.9.0.

__init__(*, pages=1, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Constructor

Parameters:
  • pages (int) – Specifies the number of pages the spreadsheet will scale to when printed.

  • style_name (CalcStylePageKind, str, optional) – Specifies the Page Style that instance applies to. Default is Default Page Style.

  • style_family (str, optional) – Style family. Default PageStyles.

Return type:

None

classmethod from_style(doc, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Gets instance from Document.

Parameters:
  • doc (object) – UNO Document Object.

  • style_name (CalcStylePageKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.

  • style_family (str, optional) – Style family. Default PageStyles.

Raises:

NotSupportedError – If obj is not supported.

Returns:

ScaleNumOfPages instance from document properties.

Return type:

ScaleNumOfPages

property prop_pages: int

Gets/Sets the number of pages the spreadsheet will scale to when printed.

Return type:

int

class ooodev.format.calc.modify.page.sheet.ScalePagesWidthHeight(*, width=1, height=1, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Bases: CellStyleBase

Page Style Shrink Print Range to pages.

New in version 0.9.0.

__init__(*, width=1, height=1, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Constructor

Parameters:
  • width (int) – Specifies number of pages width. Default is 1.

  • height (int) – Specifies number of pages height. Default is 1.

  • style_name (CalcStylePageKind, str, optional) – Specifies the Page Style that instance applies to. Default is Default Page Style.

  • style_family (str, optional) – Style family. Default PageStyles.

Return type:

None

classmethod from_style(doc, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Gets instance from Document.

Parameters:
  • doc (object) – UNO Document Object.

  • style_name (CalcStylePageKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.

  • style_family (str, optional) – Style family. Default PageStyles.

Raises:

NotSupportedError – If obj is not supported.

Returns:

Order instance from document properties.

Return type:

Order

property prop_height: int

Gets/Sets number of pages height.

Return type:

int

property prop_width: int

Gets/Sets number of pages width.

Return type:

int

class ooodev.format.calc.modify.page.sheet.ScaleReduceEnlarge(*, factor=100, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Bases: CellStyleBase

Page Style Scale Reduce or Enlarge.

New in version 0.9.0.

__init__(*, factor=100, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Constructor

Parameters:
  • factor (int) – Specifies scale factor between 10 and 400. Default is 100.

  • style_name (CalcStylePageKind, str, optional) – Specifies the Page Style that instance applies to. Default is Default Page Style.

  • style_family (str, optional) – Style family. Default PageStyles.

Return type:

None

classmethod from_style(doc, style_name=CalcStylePageKind.DEFAULT, style_family='PageStyles')[source]

Gets instance from Document.

Parameters:
  • doc (object) – UNO Document Object.

  • style_name (CalcStylePageKind, str, optional) – Specifies the Paragraph Style that instance applies to. Default is Default Paragraph Style.

  • style_family (str, optional) – Style family. Default PageStyles.

Raises:

NotSupportedError – If obj is not supported.

Returns:

Order instance from document properties.

Return type:

Order

property prop_factor: int

Gets/Sets Scaling factor. Value from 10 to 400.

Return type:

int