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
SF_MonkeySF_Monkey 

Export report to an excel template

Hello everyone,
I am trying to figure out a way to export a report or a pre-formatted excel template. Basically, I would like to created a button that user clicks and it export the report or an excel file which formatted or designed that is saved on salesforce server or our local server . It is similar functionality as conga application but we are trying to build an in-house function for our custom needs. I am able to export the report and formated it later. I am new to this so any help would be appreaciated. Any starting points or general process to accomplish this ?
Thanks!
Best Answer chosen by SF_Monkey
Raj VakatiRaj Vakati
These are the steps .. Remeber you cannt able to able teh custom button on the reports so you have to follow this approach 
  1. Crate a new VF page that will show the list of reports as drop down
  2. Then you can export the data into excel using the vf page / salesforce reporting apex api 
  3. you can process them into the template after select the report details 

or easy way is you the salesforce apex reporting rest api and read the data directly into the templates 


https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_analytics_intro.htm

https://developer.salesforce.com/docs/atlas.en-us.api_analytics.meta/api_analytics/sforce_analytics_rest_api_intro.htm

All Answers

Raj VakatiRaj Vakati
These are the steps .. Remeber you cannt able to able teh custom button on the reports so you have to follow this approach 
  1. Crate a new VF page that will show the list of reports as drop down
  2. Then you can export the data into excel using the vf page / salesforce reporting apex api 
  3. you can process them into the template after select the report details 

or easy way is you the salesforce apex reporting rest api and read the data directly into the templates 


https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_analytics_intro.htm

https://developer.salesforce.com/docs/atlas.en-us.api_analytics.meta/api_analytics/sforce_analytics_rest_api_intro.htm
This was selected as the best answer
SF_MonkeySF_Monkey
Thanks Raj! VF page is what I am using to export it right now but I want to build functionality similar to conga where I am able to manage the template to manipulate the data or read data from report and link the column in the excel sheet. What approach would be the best for this? "salesforce apex reporting rest api and read the data directly into the templates"?