JSON API - addImage

addImage

PREMIUM TRIAL / ADVANCED

Inserts an image into the Excel spreadsheet.

Note

You are reading the JSON API documentation. For the PHP API method please go to addImage.

JSON data
Key Description
image Image path, Base64 string, or URL.
position Cell position in the active sheet: "A1", "C3", "AB7"...
colOffset
  • "from" column size offset from.
  • "to" column size offset to.
colSize Number of columns used by the image.
descr Descr value.
dpi Dots per inch. Autodetect if not set.
editAs Possible values are:
  • "oneCell" (default): move but don't size with cells.
  • "twoCell": move and size with cells.
  • "absolute": don't move or size with cells.
hyperlink Hyperlink.
mime Forces a mime (image/jpg, image/jpeg, image/png, image/gif, image/bmp, image/webp).
name Sets a name value.
rotation 60.000ths of a degree.
rowOffset
  • "from" row size offset from.
  • "to" row size offset to.
rowSize Number of rows used by the image.
transparency 0 to 100.
Code samples

Example #1

Release notes
  • phpxlsx 6.0:
    • new action.