function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SachiiSachii 

Visualforce <apex:page> contenttype as excel (application/vnd.ms-excel)

Hi,

      I am trying to render a VF as MS excel file with formattings like adding a logo into header, orientation:landscape, and with page breaks.

 

 

<head>  
       <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <style type="text/css">            
            @page
            {    
              size:landscape;
              mso-page-orientation:landscape;    
              mso-header-data:"&amp;[http://www.google.com/images/logos/ps_logo2.png";
              mso-footer-data: "Page &amp;P of &amp;N ";
              margin:.3in .3in .3in .3in;
              mso-header-margin:.18in;
              mso-footer-margin:.20in;          
            }
        </style>
        
    </head>

 

 

But nothing works except footer. If anyone has any solutions, Kindly help me. 

 

P.S: My requirement demands to render only as excel and not as PDF

GennadiyGennadiy
Hello, Sachii,

Have you found any solution how to insert images in Excel?
Muzammil BajariaMuzammil Bajaria
Did any one found any solution. I am having same issue. Please sare some solution