Support

 View Only
  • 1.  Logo in excel header using VTL

    Posted 10-02-2023 23:42

    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.



    ------------------------------
    Mohamed Smaili
    Clever Circuits
    ------------------------------


  • 2.  RE: Logo in excel header using VTL

    Posted 10-03-2023 02:49

    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.



    ------------------------------
    Patrick
    ------------------------------



  • 3.  RE: Logo in excel header using VTL

    Posted 10-03-2023 03:00

    Hello Patrick,

    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.



    ------------------------------
    Mohamed Smaili
    Clever Circuits
    ------------------------------



  • 4.  RE: Logo in excel header using VTL

    Posted 10-03-2023 04:33

    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.



    ------------------------------
    Patrick
    ------------------------------



  • 5.  RE: Logo in excel header using VTL

    Posted 10-03-2023 05:51

    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.



    ------------------------------
    Mohamed Smaili
    Clever Circuits
    ------------------------------



  • 6.  RE: Logo in excel header using VTL

    Posted 10-04-2023 04:17

    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



    ------------------------------
    Patrick
    ------------------------------