Skip to main content
Solved

Insert Image into Excel

  • January 8, 2020
  • 3 replies
  • 128 views

pflegpet
Contributor
Forum|alt.badge.img+8

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!

Best answer by cdalessandro

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:

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

3 replies

lars_de_vries
Forum|alt.badge.img+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.


cdalessandro
Contributor
Forum|alt.badge.img+4
  • Contributor
  • 19 replies
  • Best Answer
  • January 9, 2020

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:

 


pflegpet
Contributor
Forum|alt.badge.img+8
  • Author
  • Contributor
  • 62 replies
  • January 9, 2020

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.