spreadsheet_intelligence.models.raw.drawing package#

Submodules#

spreadsheet_intelligence.models.raw.drawing.anchor_models module#

class spreadsheet_intelligence.models.raw.drawing.anchor_models.AnchorPoint(col: int, colOff: int, row: int, rowOff: int)[source]#

Bases: object

Represents an anchor point with column and row coordinates.

Parameters:
  • col (int) – The column index of the anchor point.

  • colOff (int) – The column offset of the anchor point.

  • row (int) – The row index of the anchor point.

  • rowOff (int) – The row offset of the anchor point.

XMLReference:
  • col – drawingX.xml/xdr:twoCellAnchor/xdr:from/xdr:col

  • colOff – drawingX.xml/xdr:twoCellAnchor/xdr:from/xdr:colOff

  • row – drawingX.xml/xdr:twoCellAnchor/xdr:from/xdr:row

  • rowOff – drawingX.xml/xdr:twoCellAnchor/xdr:from/xdr:rowOff

col: int#
colOff: int#
row: int#
rowOff: int#
class spreadsheet_intelligence.models.raw.drawing.anchor_models.Anchor(from_point: AnchorPoint, to_point: AnchorPoint)[source]#

Bases: object

Represents an anchor with two points.

Parameters:
  • from_point (AnchorPoint) – The starting point of the anchor.

  • to_point (AnchorPoint) – The ending point of the anchor.

XMLReference:
  • from_point – drawingX.xml/xdr:twoCellAnchor/xdr:from

  • to_point – drawingX.xml/xdr:twoCellAnchor/xdr:to

from_point: AnchorPoint#
to_point: AnchorPoint#

spreadsheet_intelligence.models.raw.drawing.base_models module#

class spreadsheet_intelligence.models.raw.drawing.base_models.BaseDrawingRaw(id: str, name: str, x: int, y: int, width: int, height: int)[source]#

Bases: ABC

Base class for raw drawing objects.

Parameters:
  • id (str) – Unique identifier for the drawing.

  • name (str) – Name of the drawing.

  • x (int) – X-coordinate of the drawing’s position.

  • y (int) – Y-coordinate of the drawing’s position.

  • width (int) – Width of the drawing.

  • height (int) – Height of the drawing.

XMLReference:
  • id – xl/drawingX.xml/xdr:twoCellAnchor/xdr:sp(CxnSp)/xdr:nvSpPr(nvCxnSpPr)/xdr:cNvPr >> id

  • name – xl/drawingX.xml/xdr:twoCellAnchor/xdr:sp(CxnSp)/xdr:nvSpPr(nvCxnSpPr)/xdr:cNvPr >> name

  • x – xl/drawingX.xml/xdr:twoCellAnchor/xdr:sp(CxnSp)/xdr:spPr/xdr:xfrm/xdr:off >> x

  • y – xl/drawingX.xml/xdr:twoCellAnchor/xdr:sp(CxnSp)/xdr:spPr/xdr:xfrm/xdr:off >> y

  • width – xl/drawingX.xml/xdr:twoCellAnchor/xdr:sp(CxnSp)/xdr:spPr/xdr:xfrm/xdr:ext >> cx

  • height – xl/drawingX.xml/xdr:twoCellAnchor/xdr:sp(CxnSp)/xdr:spPr/xdr:xfrm/xdr:ext >> cy

id: str#
name: str#
x: int#
y: int#
width: int#
height: int#
_abc_impl = <_abc._abc_data object>#
class spreadsheet_intelligence.models.raw.drawing.base_models.BaseAnchorRaw(anchor: Anchor, drawing: TBaseDrawingRaw)[source]#

Bases: ABC, Generic[TBaseDrawingRaw]

Base class for raw anchor objects that associate with a drawing.

anchor#

The anchor point for the drawing.

Type:

Anchor

drawing#

The drawing associated with the anchor.

Type:

TBaseDrawingRaw

XMLReference:
  • anchor – xl/drawingX.xml/xdr:twoCellAnchor/xdr:from, xdr:to

  • drawing – xl/drawingX.xml/xdr:twoCellAnchor/xdr:sp(cxnSp)

anchor: Anchor#
drawing: TBaseDrawingRaw#
_abc_impl = <_abc._abc_data object>#

spreadsheet_intelligence.models.raw.drawing.drawing_models module#

class spreadsheet_intelligence.models.raw.drawing.drawing_models.ArrowHead(type: str, width: str | None, length: str | None)[source]#

Bases: object

Represents an arrow head of a connector with type, width, and length.

XMLReference:
  • type – xl/drawingX.xml/xdr:twoCellAnchor/xdr:cxnSp/xdr:spPr/xdr:ln/xdr:headEnd(tailEnd) >> type

  • width – xl/drawingX.xml/xdr:twoCellAnchor/xdr:cxnSp/xdr:spPr/xdr:ln/xdr:headEnd(tailEnd) >> w

  • length – xl/drawingX.xml/xdr:twoCellAnchor/xdr:cxnSp/xdr:spPr/xdr:ln/xdr:headEnd(tailEnd) >> len

type: str#
width: str | None#
length: str | None#
class spreadsheet_intelligence.models.raw.drawing.drawing_models.ArrowLine(width: int, cap: str | None, compound: str | None, alignment: str | None, dash_style: str, head: ArrowHead, tail: ArrowHead)[source]#

Bases: object

Represents an arrow line of a connector with width, cap, compound, alignment, dash style, and arrow heads.

XMLReference:
  • width – xl/drawingX.xml/xdr:twoCellAnchor/xdr:cxnSp/xdr:spPr/xdr:ln >> w

  • cap – xl/drawingX.xml/xdr:twoCellAnchor/xdr:cxnSp/xdr:spPr/xdr:ln >> cap

  • compound – xl/drawingX.xml/xdr:twoCellAnchor/xdr:cxnSp/xdr:spPr/xdr:ln >> cmpd

  • alignment – xl/drawingX.xml/xdr:twoCellAnchor/xdr:cxnSp/xdr:spPr/xdr:ln >> algn

  • dash_style – xl/drawingX.xml/xdr:twoCellAnchor/xdr:cxnSp/xdr:spPr/xdr:ln/xdr:prstDash >> val

  • head – xl/drawingX.xml/xdr:twoCellAnchor/xdr:cxnSp/xdr:spPr/xdr:ln/xdr:headEnd

  • tail – xl/drawingX.xml/xdr:twoCellAnchor/xdr:cxnSp/xdr:spPr/xdr:ln/xdr:tailEnd

width: int#
cap: str | None#
compound: str | None#
alignment: str | None#
dash_style: str#
head: ArrowHead#
tail: ArrowHead#
class spreadsheet_intelligence.models.raw.drawing.drawing_models.ConnectorRaw(id: str, name: str, x: int, y: int, width: int, height: int, connector_type: ConnectorType, flip_h: bool, flip_v: bool, rotation: float, arrow_line: ArrowLine, interm_line_pos: int | None, style_refs: StyleRefs, scheme_clr: SchemeClr | None, srgb_clr: SrgbClr | None)[source]#

Bases: BaseDrawingRaw

Represents information shared by all connector types, including type, flip, rotation, line data, intermediate line position, style references, and color data.

connector_type#

The type of connector.

Type:

ConnectorType

flip_h#

Whether the connector is flipped horizontally.

Type:

bool

flip_v#

Whether the connector is flipped vertically.

Type:

bool

rotation#

The rotation of the connector in degrees.

Type:

float

arrow_line#

The line data for the connector.

Type:

ArrowLine

interm_line_pos#

The position of the intermediate line.

Type:

Optional[int]

style_refs#

The style references for the connector.

Type:

StyleRefs

scheme_clr#

The scheme color for the connector.

Type:

Optional[SchemeClr]

srgb_clr#

The sRGB color for the connector.

Type:

Optional[SrgbClr]

XMLReference:
  • connector_type – xl/drawingX.xml/xdr:twoCellAnchor/xdr:cxnSp/xdr:spPr/xdr:prstGeom >> prst

  • flip_h – xl/drawingX.xml/xdr:twoCellAnchor/xdr:cxnSp/xdr:spPr/xdr:xfrm >> flipH

  • flip_v – xl/drawingX.xml/xdr:twoCellAnchor/xdr:cxnSp/xdr:spPr/xdr:xfrm >> flipV

  • rotation – xl/drawingX.xml/xdr:twoCellAnchor/xdr:cxnSp/xdr:spPr/xdr:xfrm >> rot

  • arrow_line – xl/drawingX.xml/xdr:twoCellAnchor/xdr:cxnSp/xdr:spPr/xdr:ln

  • interm_line_pos – xl/drawingX.xml/xdr:twoCellAnchor/xdr:cxnSp/xdr:spPr/xdr:prstGeom/xdr:avLst/xdr:gd >> fmla

  • style_refs – xl/drawingX.xml/xdr:twoCellAnchor/xdr:cxnSp/xdr:style/a:lnRef >> idx

  • scheme_clr – xl/drawingX.xml/xdr:twoCellAnchor/xdr:cxnSp/xdr:style/a:lnRef/a:schemeClr >> val

  • srgb_clr – xl/drawingX.xml/xdr:twoCellAnchor/xdr:cxnSp/xdr:style/a:lnRef/a:srgbClr >> val

connector_type: ConnectorType#
flip_h: bool#
flip_v: bool#
rotation: float#
arrow_line: ArrowLine#
interm_line_pos: int | None#
style_refs: StyleRefs#
scheme_clr: SchemeClr | None#
srgb_clr: SrgbClr | None#
_abc_impl = <_abc._abc_data object>#
class spreadsheet_intelligence.models.raw.drawing.drawing_models.PictureRaw(id: str, name: str, x: int, y: int, width: int, height: int, image_path: str)[source]#

Bases: BaseDrawingRaw

image_path: str#
_abc_impl = <_abc._abc_data object>#
class spreadsheet_intelligence.models.raw.drawing.drawing_models.ShapeRaw(id: str, name: str, x: int, y: int, width: int, height: int, shape_type: str, fill_scheme_clr: SchemeClr | None, fill_srgb_clr: SrgbClr | None, line_scheme_clr: SchemeClr | None, line_srgb_clr: SrgbClr | None, style_refs: StyleRefs | None, text_data: List[str])[source]#

Bases: BaseDrawingRaw

Represents a shape with type, fill color, line color, style references, and text data.

shape_type#

The type of shape.

Type:

str

fill_scheme_clr#

The scheme color for the fill.

Type:

Optional[SchemeClr]

fill_srgb_clr#

The sRGB color for the fill.

Type:

Optional[SrgbClr]

line_scheme_clr#

The scheme color for the line.

Type:

Optional[SchemeClr]

line_srgb_clr#

The sRGB color for the line.

Type:

Optional[SrgbClr]

style_refs#

The style references for the shape.

Type:

Optional[StyleRefs]

text_data#

The text data for the shape.

Type:

List[str]

XMLReference:
  • shape_type – xl/drawingX.xml/xdr:twoCellAnchor/xdr:spPr/a:prstGeom >> prst

  • fill_scheme_clr – xl/drawingX.xml/xdr:twoCellAnchor/xdr:spPr/a:solidFill/a:schemeClr >> val

  • fill_srgb_clr – xl/drawingX.xml/xdr:twoCellAnchor/xdr:spPr/a:solidFill/a:srgbClr >> val

  • line_scheme_clr – xl/drawingX.xml/xdr:twoCellAnchor/xdr:spPr/a:ln/a:solidFill/a:schemeClr >> val

  • line_srgb_clr – xl/drawingX.xml/xdr:twoCellAnchor/xdr:spPr/a:ln/a:solidFill/a:srgbClr >> val

  • style_refs – xl/drawingX.xml/xdr:twoCellAnchor/xdr:spPr/a:style

  • text_data – xl/drawingX.xml/xdr:twoCellAnchor/xdr:spPr/a:txBody/a:bodyPr/a:textAlignment >> val

shape_type: str#
fill_scheme_clr: SchemeClr | None#
fill_srgb_clr: SrgbClr | None#
line_scheme_clr: SchemeClr | None#
line_srgb_clr: SrgbClr | None#
style_refs: StyleRefs | None#
text_data: List[str]#
_abc_impl = <_abc._abc_data object>#
class spreadsheet_intelligence.models.raw.drawing.drawing_models.ConnectorAnchorRaw(anchor: Anchor, drawing: TBaseDrawingRaw)[source]#

Bases: BaseAnchorRaw[ConnectorRaw]

Represents an anchor point for a connector with a connector data.

anchor#

The anchor point for the connector.

Type:

Anchor

drawing#

The connector data associated with the anchor.

Type:

ConnectorRaw

_abc_impl = <_abc._abc_data object>#
class spreadsheet_intelligence.models.raw.drawing.drawing_models.PictureAnchorRaw(anchor: Anchor, drawing: TBaseDrawingRaw)[source]#

Bases: BaseAnchorRaw[PictureRaw]

Represents an anchor point for a picture with a picture data.

anchor#

The anchor point for the picture.

Type:

Anchor

drawing#

The picture data associated with the anchor.

Type:

PictureRaw

_abc_impl = <_abc._abc_data object>#
class spreadsheet_intelligence.models.raw.drawing.drawing_models.ShapeAnchorRaw(anchor: Anchor, drawing: TBaseDrawingRaw)[source]#

Bases: BaseAnchorRaw[ShapeRaw]

Represents an anchor point for a shape with a shape data.

anchor#

The anchor point for the shape.

Type:

Anchor

drawing#

The shape data associated with the anchor.

Type:

ShapeRaw

_abc_impl = <_abc._abc_data object>#

Module contents#