class Axlsx::Pic

a Pic object represents an image in your worksheet Worksheet#add_image is the recommended way to manage images in your sheets

Creates a new Pic(ture) object


  • anchor (Anchor)

    the anchor that holds this image

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • name (String)
  • descr (String)
  • image_src (String)
  • start_at (Array)
  • width (Intger)
  • height (Intger)


  • (_self)

Yield Parameters:

  • _self (Axlsx::Pic)

    the object that the method was called on

The anchor for this image

A description of the picture

noop if not using a two cell anchor


  • x (Integer)

    The column

  • y (Integer) (defaults to: nil)

    The row

returns the extension of image_src without the preceeding '.'

The file name of image_src without any path information


this is a noop if you are using a TwoCellAnchor

providing access to update the anchor's height attribute


  • v (Integer)

This is a noop if you are using a TwoCellAnchor

Returns the value of attribute hyperlink

The path to the image you want to include Only local images are supported at this time.

The index of this image in the workbooks images collections

The name to use for this picture

The picture locking attributes for this picture

The part name for this image used in serialization and relationship building

The relationship object for this pic.

This is a short cut method to set the start anchor position If you need finer granularity in positioning use graphic_frame.anchor.from.colOff / rowOff


  • x (Integer)

    The column

  • y (Integer) (defaults to: nil)

    The row

refactoring of swapping code, law of demeter be damned!

Serializes the object


  • str (String) (defaults to: '')

Changes the anchor to a one cell anchor.

changes the anchor type to a two cell anchor

providing access to the anchor's width attribute


  • v (Integer)

Pic is referenced in 0 repositories