| xlsx_drawing | R Documentation |
R6 class that manages a drawing file for an xlsx
sheet. Used internally by sheet_add_drawing() methods.
officer::openxml_document -> xlsx_drawing
officer::openxml_document$dir_name()officer::openxml_document$feed()officer::openxml_document$file_name()officer::openxml_document$get()officer::openxml_document$name()officer::openxml_document$rel_df()officer::openxml_document$relationship()officer::openxml_document$remove()officer::openxml_document$replace_xml()officer::openxml_document$save()new()Create or reuse a drawing for a sheet.
xlsx_drawing$new(package_dir, sheet_obj, content_type)
package_dirpath to the unpacked xlsx directory
sheet_obja sheet R6 object
content_typea content_type R6 object
add_chart_anchor()Add a chart anchor to the drawing (absolute placement in inches from the top-left corner of the sheet).
xlsx_drawing$add_chart_anchor( chart_rid, left = 1, top = 1, width = 6, height = 4 )
chart_ridrelationship id of the chart
left, toptop-left anchor in inches
width, heightsize in inches
add_chart_rel()Add a relationship from the drawing to a chart file.
xlsx_drawing$add_chart_rel(chart_basename)
chart_basenamefilename of the chart XML
add_image_rel()Add a relationship from the drawing to a media image.
xlsx_drawing$add_image_rel(image_basename)
image_basenamefilename (without directory) of the image
sitting in xl/media/.
add_image_anchor()Add an image anchor to the drawing (absolute placement in inches from the top-left corner of the sheet).
xlsx_drawing$add_image_anchor( image_rid, left = 1, top = 1, width = 2, height = 2, alt = "" )
image_ridrelationship id of the image
left, toptop-left anchor in inches
width, heightsize in inches
altalternative text
clone()The objects of this class are cloneable with this method.
xlsx_drawing$clone(deep = FALSE)
deepWhether to make a deep clone.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.