Logo in excel header using VTL

Mohamed Smaili
Mohamed Smaili Member Posts: 15

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
------------------------------

Comments

  • Patrick Szabo
    Patrick Szabo Member, Medical Devices & Life Sciences Solution Posts: 55
    edited October 2023

    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
    ------------------------------
    -------------------------------------------
    Original Message:
    Sent: 10-02-2023 23:42
    From: Mohamed Smaili
    Subject: Logo in excel header using VTL

    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
    ------------------------------
    Patrick
  • Mohamed Smaili
    Mohamed Smaili Member Posts: 15
    edited October 2023

    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
    ------------------------------
    -------------------------------------------
    Original Message:
    Sent: 10-03-2023 02:49
    From: Patrick Szabo
    Subject: Logo in excel header using VTL

    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
    ------------------------------

    Original Message:
    Sent: 10-02-2023 23:42
    From: Mohamed Smaili
    Subject: Logo in excel header using VTL

    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
    ------------------------------
  • Patrick Szabo
    Patrick Szabo Member, Medical Devices & Life Sciences Solution Posts: 55
    edited October 2023

    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
    ------------------------------
    -------------------------------------------
    Original Message:
    Sent: 10-03-2023 03:00
    From: Mohamed Smaili
    Subject: Logo in excel header using VTL

    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
    ------------------------------

    Original Message:
    Sent: 10-03-2023 02:49
    From: Patrick Szabo
    Subject: Logo in excel header using VTL

    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

    Original Message:
    Sent: 10-02-2023 23:42
    From: Mohamed Smaili
    Subject: Logo in excel header using VTL

    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
    ------------------------------
    Patrick
  • Mohamed Smaili
    Mohamed Smaili Member Posts: 15
    edited October 2023

    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
    ------------------------------
    -------------------------------------------
    Original Message:
    Sent: 10-03-2023 04:33
    From: Patrick Szabo
    Subject: Logo in excel header using VTL

    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
    ------------------------------

    Original Message:
    Sent: 10-03-2023 03:00
    From: Mohamed Smaili
    Subject: Logo in excel header using VTL

    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

    Original Message:
    Sent: 10-03-2023 02:49
    From: Patrick Szabo
    Subject: Logo in excel header using VTL

    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

    Original Message:
    Sent: 10-02-2023 23:42
    From: Mohamed Smaili
    Subject: Logo in excel header using VTL

    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
    ------------------------------
  • Patrick Szabo
    Patrick Szabo Member, Medical Devices & Life Sciences Solution Posts: 55
    edited October 2023

    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
    ------------------------------
    -------------------------------------------
    Original Message:
    Sent: 10-03-2023 05:51
    From: Mohamed Smaili
    Subject: Logo in excel header using VTL

    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
    ------------------------------

    Original Message:
    Sent: 10-03-2023 04:33
    From: Patrick Szabo
    Subject: Logo in excel header using VTL

    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

    Original Message:
    Sent: 10-03-2023 03:00
    From: Mohamed Smaili
    Subject: Logo in excel header using VTL

    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

    Original Message:
    Sent: 10-03-2023 02:49
    From: Patrick Szabo
    Subject: Logo in excel header using VTL

    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

    Original Message:
    Sent: 10-02-2023 23:42
    From: Mohamed Smaili
    Subject: Logo in excel header using VTL

    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
    ------------------------------
    Patrick