use this as an example: To see real data, make sure to include ?id=1212434323434332 where 1212434323434332 is the account id in your org
<apex:page standardController="Account" contenttype="application/vnd.ms-excel#Demo Example.xlsx">
<apex:pageBlock title="Hello {!$User.FirstName}!">
You are viewing the {!account.name} account.
</apex:pageBlock>
<apex:pageBlock title="Contacts">
<apex:pageBlockTable value="{!account.Contacts}" var="contact">
<apex:column value="{!contact.Name}"/>
<apex:column value="{!contact.Email}"/>
<apex:column value="{!contact.Phone}"/>
</apex:pageBlockTable>
</apex:pageBlock>
</apex:page>
As a common practice, if your question is answered, please choose 1 best answer. But you can give every answer a thumb up if that answer is helpful to you.
use this as an example:
To see real data, make sure to include ?id=1212434323434332 where 1212434323434332 is the account id in your org
As a common practice, if your question is answered, please choose 1 best answer.
But you can give every answer a thumb up if that answer is helpful to you.
Thanks