Solved

Insert Image into Excel

  • 8 January 2020
  • 3 replies
  • 27 views

Badge +7

Hi,

I know there are already threads about inserting images into Excel spreadsheets but I could not find a solution for my problem yet. In my workspace I create an image with MapnikRasterizer and a table, both of which I would like to write to Excel. For that purpose I created a template that is used in the writer. I define the cell location for the image in an AttributeManager but in the output it overlaps the table instead of being inserted into the defined cell. I'm sure there is some writer setting I'm setting up incorrectly but I just can not figure out which one. Example workbench and template are attached. Thanks for any help!

icon

Best answer by cdalessandro 9 January 2020, 16:48

View original

3 replies

Badge +10

It was a long time ago I did this, but if I remember well, the cell is only used as a reference and the image will not be inserted within the cell. The anchor of the image will be on the top left of the cell.

However, there are two properties that can be set, to adjust the image size. If you set those correctly, the image will be shown as you wish.

Badge

Hi Kasparlov,

in your example You set "row_id" and "col_id" not for image but for texts. So, to set position for image, you had to insert an attribute manager (or creator) at the red arrow position.

To arrange image size instead, you had to modify MapnikRasterize transformer options here:

 

Badge +7

Hi Kasparlov,

in your example You set "row_id" and "col_id" not for image but for texts. So, to set position for image, you had to insert an attribute manager (or creator) at the red arrow position.

To arrange image size instead, you had to modify MapnikRasterize transformer options here:

 

Thank you! I got it to work. What was most important was to set the correct cell size in the Excel template.

Reply