I am trying to add a logo in the header of an excel file using a velocity code, couldn't find a way to add it. Help is needed.
I have done that by creating an empty excel file with the logo in Excel, then save it as Single File Web Page (*.mht) and rename the file ending to *.vm. With that, the logo is embedded into the velocity template as base64 and you can add your code accordingly where you need it.
I tried doing it like this I added an image from my desktop and saved it as mhtml then I reopened the file in excel but I wasn't able to see the image again and in the mhtml the image wasn't referenced in a clear way. Would appreciate your extra help if you faced anything like that.
Thanks in advance.
It looks like this doesn't work when the image is in the header or footer. In the file I did that, the image was in a cell, not in the header. Have you tried to use an url? I used that approach in a Word file and added the image as an url to our website, as the logo is always present there. On the first opening of the file, the image will be downloaded from the website. In Word this works well, but I don't know if this also works in excel.
I tried adding an online image to excel header but still it did not work the thing is that in the Velocity code it is only inserted in the header as &L&G and there is no other reference for the image as when you insert it in the cell.
I tried a few things but none of it works. It looks like the limitation is in the vm format. But maybe someone else has an idea
HEADQUARTERS|135 SW Taylor Suite 200, Portland, Oregon, 97204