0

I want to insert an image in excel sheet. In below code, i don't know what should be the type(ss:type) and what should be included in data tag to export image in excel sheet.

<row>
  <Cell ss:StyleID="someStyleId">
    <Data ss:Type="   ">

    </Data>
  </Cell>
</row>
2
  • I think it is not possible(I could be wrong!). The reason is if you open excel on your system and insert image in it and save excel with type as xml spreadsheet, it will save but if you reopen the same file in excel, the image disappears. Also there is no option here msdn.microsoft.com/en-us/library/… on how to insert image so I guess you are out of luck(but again I could be wrong!).
    – javanoob
    Commented Jan 19, 2017 at 6:31
  • Do you have any other alternative to add image in excel using VF page? Commented Jan 19, 2017 at 7:05

1 Answer 1

0

After few days of research, i came to below conclusion.

Unfortunately, “Spreadsheet XML” does not provide a way to embed images. We can insert using “Office Open XML”, which cannot be implemented in salesforce**(Correct me if I am wrong)**.

Please refer to below links for more details.

Generate xlsx file from Apex

http://www.soliantconsulting.com/blog/2016/03/stylish-spreadsheets-from-a-visualforce-page (last comment on this page)

https://msdn.microsoft.com/en-us/library/aa140066(office.10).aspx

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .