You need to sign in to do that
Don't have an account?
AutoPopulating an Excel from the Detailed Page in salesforce.
Hi All,
Firstly thank you for all the support from the forums. It has been such a great help for developers.
My query for the day:
I wanted to auto populate few fields in the Excel sheet (spread sheet) from the details in the detailed page of a lead on click of a custom button.
I have tried the following approach :
<apex:page standardController="Account" contenttype="application/vnd.ms-excel#contacts.xls" cache="true"> <apex:form > <apex:detail subject="{!$CurrentPage.parameters.cid}" relatedList="false"/> </apex:form> </apex:page>
Using the above approach i am able to create an excel that can accommodate only fixed format depending on the Detailed page design.
I would like to populate the fields in a pre-existing format of excel that is present on my desktop. Could any one direct me how could i feed or autopopulate the correct data in an existing proforma on a button click.
Do we use any webservices or a class, Please walk me through this.
Urgent help is needed.
TIA.
- Sushupsi.
I have tried the auto population of excel in other format using the Attachment Object.
The code looks like the following :
This actually helps. Hope if any one requires this it might help them.
NOTE: I have written it on button click.
-Sushupsi
All Answers
Hi,
Salesforce only generates the fixed format depending on the Detailed page design. It cannot be populated with fields in a pre-existing format of excel . Because salesforce only Renders it as Excel and it will not take care of the formatting of the Excel file.
I have tried the auto population of excel in other format using the Attachment Object.
The code looks like the following :
This actually helps. Hope if any one requires this it might help them.
NOTE: I have written it on button click.
-Sushupsi