Visualforce page RenderAs:
<apex:page contentType="application/x-excel#RenderAsTestFile.xls" standardController="TestObject__c"><apex:pageBlock >
<apex:pageblockTable value="{!TestObject__c}" var="v" border="1"
columnsWidth="100px,200px,150px" cellspacing="0" cellpadding="8">
<apex:column headerValue="Id">{!v.Name}</apex:column>
<apex:column headerValue="Name">{!v.Name__c}</apex:column>
<apex:column headerValue="Contact Number">{!v.Mobile__c}</apex:column>
<apex:column headerValue="Mail id">{!v.Mail_id__c}</apex:column>
</apex:pageblockTable>
</apex:pageBlock>
</apex:page>
Render As EXCEL FILE
No comments:
Post a Comment