Skip to main content
Hello Experts,

I have created excel workbook with help of VF page & XML Spreadsheet Reference. However I am not able to insert the company's logo in the first sheet. Can any one please suggest me how to insert an image in the sheet. Below is the VF code :

<apex:page controller="XYZ_controller" sidebar="false" showHeader="false"  contentType="application/vnd.ms-excel⌗{!object.Name__c}_Bid_Preview.xls" cache="true" action="{!changeProposalStatus}">

    {!xmlheader}

    <Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"

      xmlns:o="urn:schemas-microsoft-com:office:office"

      xmlns:x="urn:schemas-microsoft-com:office:excel"

      xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"

      xmlns:html="http://www.w3.org/TR/REC-html40">

         

        <OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office">

            <AllowPNG/>

        </OfficeDocumentSettings>

        

        <ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel">

            <WindowHeight>7845</WindowHeight>

            <WindowWidth>12045</WindowWidth>

            <WindowTopX>630</WindowTopX>

            <WindowTopY>630</WindowTopY>

            <ProtectStructure>False</ProtectStructure>

            <ProtectWindows>False</ProtectWindows>

        </ExcelWorkbook>

<Worksheet ss:Name="Cover">

  <Table>

  <Column ss:Width="70" ss:StyleId="s_plain"/>

  <Column ss:Width="100" ss:StyleId="s_plain"/>

  <Column ss:Width="100" ss:StyleId="s_plain"/>

  <Column ss:Width="250" ss:StyleId="s_plain"/>

    <Row>

        <Cell  ss:Index="2" ss:StyleID="s9_confidential" ss:MergeAcross="3"><Data ss:Type="String">CONFIDENTIAL</Data></Cell>

    </Row>

    <Row></Row>

      

<I NEED TO INSERT AN IMAGE HERE i.e COMPANY'S LOGO> (For testing, any logo will do)

<Row ss:AutoFitHeight="1">

        <Cell  ss:Index="2" ss:StyleID="s_cover_heading" ss:MergeAcross="3"><Data ss:Type="String">Test Data</Data></Cell>

    </Row>

    <Row>

        <Cell  ss:Index="2" ss:StyleID="s_cover_heading_lab" ss:MergeAcross="3"><Data ss:Type="String">Test Data</Data></Cell>

    </Row>

    <Row></Row>

    

</Worksheet> 

   </Workbook>  

</apex:page>

    

I request your swift support and help on this. Your efforts would be greatly appreciated. Thanks in advance...!!
3 respuestas
0/9000