Advertisement
TheCasa

VF to excel

May 31st, 2012
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. <apex:page standardController="Opportunity" showHeader="false" contenttype="application/vnd.ms-excel#SalesPacket.xls" >
  2.  
  3. <apex:dataTable value="{! Opportunity}" var="opportunity" >
  4. <apex:column headerValue="Opp Name" value="{! opportunity.name}" />
  5. <apex:column headerValue="Owner Name" value="{! opportunity.owner.name}" />
  6. <apex:column headerValue="Account Name" value="{! opportunity.account.name}" />
  7. <apex:column headerValue="Billing Address" value="{! opportunity.account.billingstreet}" />
  8.  
  9. </apex:dataTable>
  10. <apex:dataTable value="{!opportunity.OpportunityContactRoles}" var="OC">
  11. <apex:column headerValue="Contact Name" value="{!OC.Contact.Name}"/>
  12.  
  13. <apex:column headerValue="Contact Role" value="{!OC.Role}"/>
  14.  
  15. </apex:dataTable>
  16.  
  17. </apex:page>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement