% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xl_add_vg.R
\name{xl_add_vg}
\alias{xl_add_vg}
\title{add a plot output as vector graphics into an Excel object}
\usage{
xl_add_vg(x, sheet, code, left, top, width, height, ...)
}
\arguments{
\item{x}{an \code{rxlsx} object produced by \code{officer::read_xlsx}}

\item{sheet}{sheet label/name}

\item{code}{plot instructions}

\item{left, top}{left and top origin of the plot on the sheet in inches.}

\item{height, width}{Height and width in inches.}

\item{...}{arguments passed on to \code{\link{dml_xlsx}}.}
}
\description{
Deprecated, use \code{\link[officer:sheet_add_drawing]{officer::sheet_add_drawing()}} with a \code{\link[=dml]{dml()}} object instead.
}
\examples{
\donttest{
library(officer)
my_ws <- read_xlsx()
my_ws <- sheet_add_drawing(my_ws,
  value = dml(code = barplot(1:5, col = 2:6)),
  sheet = "Feuil1",
  width = 6, height = 6, left = 1, top = 2
)
fileout <- tempfile(fileext = ".xlsx")
print(my_ws, target = fileout)
}
}
