You need to sign in to do that
Don't have an account?
SFDC_2706
Cannot display Image in excel sheet...!!
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...!!
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...!!
Please check with this for similar issue.
https://developer.salesforce.com/forums/?id=906F000000098TOIAY
Hope this helps.
Best Regards,
Nagendra.P
Use this <apex:image url="http://images.google.com/intl/en_ALL/images/logos/images_logo_lg.gif"/>
tag b/w row i think it will resolve .
Regards,
Harish.R.
Try below code:
<apex:page contentType="application/vnd.ms-excel#SalesForceExport.xls" cache="true">
<table>
<tr>
<td>
<img src="http://images.google.com/intl/en_ALL/images/logos/images_logo_lg.gif"/>
</td>
</tr>
</table>
</apex:page>
Thanks,
Tejas