addImage: Insert an image in a work sheet

addImageR Documentation

Insert an image in a work sheet

Description

This function and its methods allow the R programmer to place an image (e.g. JPEG or PNG file) on an Excel worksheet.

Usage

addImage(sheet, img, from = c(1, 1), to = c(4, 4), dim = c(100, 100),
           desc = img, update = TRUE, ...)

Arguments

sheet

the worksheet on which to place the image

img

the name of the image file to be placed. (This could be the raw data representing the image)

from

the top-left location for the image in terms of rows and columns. This can be specified in cell format, e.g. "A5"

to

the bottom right location of the image

dim

the width and height of the image. We could read this automatically but require additional packages.

desc

a string giving a description of the image.

update

a logical value that controls whether the modified XML documents are written back to the Excel archive (.xlsx) file. If not, the updated documents are returned and can be added to the archive later.

...

additionak parameters for methods

Author(s)

Duncan Temple Kang

See Also

addChart in development.

Examples

 # See the test files

duncantl/RExcelXML documentation built on Nov. 23, 2023, 4:21 p.m.