In one of our last posts “PDF Export in Salesforce“, we described how to download data in PDF format in Salesforce. Now we will be describing how to download data in excel format as promised in our previous blog. On the same pattern like PDF; contentType=”application/vnd.ms-excel#Export.xls” is the tag used to download the salesforce page in excel format. In this blog we will discuss the Excel download functionality without redirecting to another page.
New Stuff: Changing the date range in standard Salesforce Calendar
Below is sample code for main VF page and its controller –Next we create an excel_demoexport Page having the same controller as in Main Page that will be returned to the main page to download the data in Excel format.
We need to set the contents of exportDataString in the page Excel_demoexport as in <apex:outputText> tag . Note that we have used the set escape attribute to false as shown below –Using the above steps, you can optimize the excel export feature for huge data as well.
Greytrix as a Salesforce Product development partner offers a wide variety of integration products and services to the end users as well as to the Partners across the globe. We offers Consultation, Configuration, Training and support services in out-of-the-box functionality as well as customizations to incorporate custom business rules and functionalities that requires apex code incorporation into the Salesforce platform.
Greytrix has some unique solutions for Cloud CRM such as Salesforce integration with Sage Enterprise Management (Sage X3), Sage Intacct, Sage 100 and Sage 300 (Sage Accpac). We also offer best-in-class Cloud CRM Salesforce customization and development services along with services such as Salesforce Data Migration, Integrated App development, Custom App development and Technical Support to business partners and end users.
Greytrix GUMU™ integration for Sage ERP – Salesforce is a 5-star app listed on Salesforce AppExchange.
For more information, please contact us at firstname.lastname@example.org. We will be glad to assist you.