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
Nishad BashaNishad Basha 

How to download records and save in Excel Format through Visualforce page

how to solve the above scenario please give  me some ideas.
Best Answer chosen by Nishad Basha
William TranWilliam Tran

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/ Example.xlsx">
<apex:pageBlock title="Hello {!$User.FirstName}!">
You are viewing the {!} account.
<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}"/>

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.