E2Excel App | Excel Salesforce Integration


Astrea E2Excel App Image

E2Excel is a native Salesforce app. We have written Apex code to export the data from List view. We do not pull the data out of your Salesforce instance. All data remains in your Salesforce instance.

E2Excel supports Account, Contact, Lead, Opportunity and any custom objects. In the Application, the Export To Excel button is only present for Account , Contact, Lead And Opportunity . Users can add this button to any object required. Now, Users are able to export the exact replica of the list view of any object with complete records or selected records in a button click only.

You can get the product from Salesforce AppExchange.

In this Application, the button is used for both standard and custom objects. Users can select the specific records or can export all records without selecting the checkbox of the object required.

Other features that E2Excel supports are:

  • Simple, easy to use intuitive interface with just one button.
  • Users can select the records by selecting the checkbox or they can export all records by just clicking the button.

Step to Configure E2Excel After Installation.

Step 1: In Lightning Experience navigate to Setup and type App Manager in the Quick Find box and select App Manager or in Classic navigate to Setup and type Apps in the Quick Find box and select Apps.

Step 2: Click on New Connected App.

Step 3: Enter required fields under Basic Information.

Step 4: Under API (Enable OAuth Settings), check Enable OAuth Settings checkbox.

Step 5: For now, enter some URL in the Callback URL field because we have to change it later.

Step 6: For Selected OAuth Scopes, select Full Access and Perform requests on your behalf at any time (refresh_token, offline_access). Keep the remaining fields as default and click on

Step 7: Save.

new connected app

Figure 1: Create a connected App.

Step 8: After clicking on continue button, you will see your Connected App and now it’s time to get Consumer Secret and Consumer Key, for that click on Manage Consumer Details button and the user will be redirected to salesforce login page. When you log back in, you will be able to see your Consumer Secret and Consumer Key.

Note: Copy the Consumer Key and Consumer Secret, we need this information in the Auth.Provider step.

2. Create Auth. Provider:

Step 1: In Lightning Experience navigate to Setup and type Auth. Providers in the Quick Find box and click on Auth. Providers or in Classic navigate to Setup and type Auth. Providers in the Quick Find box and click on Auth. Providers.

Step 2: Click New and in Provider Type select Salesforce.

Step 3: Enter Name and Url Suffix.

Step 4: In the Consumer Key and Consumer Secret fields, enter the consumer key and consumer secret that you got earlier in the Connected App.

Step 5: In the Default Scopes fields, enter the value as refresh_token full. Keep the rest of the fields as default and click Save.

Auth Provider

Figure 2: Create an Auth provider.

Auth Provider Details

Figure 3: Copy to call back Url from Auth Provider.

Note: Copy the Callback URL from here and paste it in the Callback URL field for the Connected App that you created earlier.

Call Back URL

Figure 4: Paste the Call Back URL in the previously created connected App.

3. Define Named Credentials:

Step 1: In Lightning Experience navigate to Setup and type Named Credentials in Quick Find box and click on New Legacy or in Classic navigate to Setup and type Named Credentials in Quick Find box and click on New Named Credentials.

Step 2: Provide the Label and Name as E2Excel (The Label and Name must be E2Excel).

Step 3: In the URL field, copy the Callback URL from Auth. Provider and paste here only the url starting from https upto .com and remove all the remaining part after .com. For example, the Callback URL is https://astrea-app-test-deved.my.salesforce.com/services/authcallback/E2ExcelAuthProvider


Then the user must paste only https://astrea-app-test-deved.my.salesforce.com in the named credential URL field.

Step 4: In Identity Type, select Per User (The Per User authentication provides access control at the individual user level).

Step 5: In Authentication Protocol select OAuth 2.0 and for the Authentication Provider, select Auth. Provider you just created earlier.

Step 6 In the Scope field, enter the value as refresh_token full.

Step 7 Do not check Start Authentication Flow on Save checkbox as Authentication flow will be executed by an individual user.

Step 8 Keep the Generate Authorization Header checkbox checked and hit Save.

New Named Credentials of Legacy Type

Figure 5: Create New Named Credentials of Legacy Type.

4. Authentication Settings for External Systems:

Now, an individual user has to set up the Authentication Setting for External Systems and execute the Authentication flow.

Step 1 Click on the View Profile button on the top right corner and then click on Settings.

Step 2 Click on Authentication Settings for External Systems under My Personal Information In the left sidebar. Click on New to create an Authentication Settings.

Step 3: In the External System Definition field, select Named Credential.

Step 4: In the Named Credential field, select the Named Credential created earlier as E2Excel.

Step 5: In Authentication Protocol, select OAuth 2.0. and for Authentication Provider and Scope should be auto-populated based on the Named Credentials selected.

Step 6: Check the Start Authentication Flow on Save checkbox which will trigger the Authentication flow. Click Save.

Step 7: After clicking Save, the user will be redirected to the Login page for the target org. Enter your Salesforce login credential. After login, it will ask permission to access your data based on the Scopes you entered in the Connected App. Click Allow and you will be redirected to the Authentication Settings for External Systems page.

Set up the Authentication Setting

Figure 6: Set up the Authentication Setting for External Systems

The User can use the functionality of E2Excel by following below steps: -

Step 1: Click on Setup → Object Manager → Account → List View Button Layout →Edit List View.

Step 2: Add the Export To Excel button and Save

Add Export to Excel

Figure 7: Add Export to Excel Button on List View.

After adding the list view button on Account object, you can navigate to the Account list view page to Export the record. Select the Account records by selecting the checkboxes for exporting specific Accounts in Excel and click on Export to Excel Button. The Excel sheet with the selected records will be downloaded to your desktop.If you want to export Account objects to all records then you do not need to select any record, just click on Export to Excel Button.

Export to Excel Button

Figure 8: Export to Excel Button is added on Account List View.

Excel Sheet is generated

Figure 9: Excel Sheet is generated when the Export To Excel button is clicked.

Support For Communities

Before using components in community, follow below step: -

Note: If Digital Experiences is already enabled into your org, then follow below steps from Step 3 to Step 6 else follow below all steps from Step 1 to Step 6.

Step 1: Click on Setup and in Quick Find box search Digital Experiences.

Step 2: Enable community from Digital Experience via clicking on Enable Digital Experiences checkbox.

Enable Digital experience

Figure 10: Enable Digital experience in Org.

Step 3: Now again refresh the setup page and in the Quick Find box search for All Sites and click on the New button to create New Site.

Create new Sites

Figure 11: Create new Sites for Community.

Step 4: You can choose the template below to create a New Site.

-Customer Service

-Build Your Own (Aura)

-Customer Account Portal

-Help Centre

-Aloha

-Partner Central

Step 5: After the site is created, just Activate and add members in it.

Step 6: Now from setup in Quick Find box search for All Sites and choose your site and click on Builder option to go to your community builder page, to drag and drop ExportListView component from available custom component list. Then Publish it.

component on community pages

Figure 12: Add Export To Excel component on community pages and publish it.

Note You must enable Apex Rest Services and API Enabled option for the Community user profile and also, you must add the following components on community user profile:

-ListViewPaginationCtrl (Apex class)

-UtilityObjectCRUDCtrl (Apex class)

Enable Apex Rest Services

Figure 13: Enable Apex Rest Services and API Enabled option for the Community user profile

Step 7: After adding the ExportListView component and publishing the site, now the community user needs to follow the steps given above in Hands-on Standard object list view and in Hands-on Custom object list view to export the Sobject list view record in excel sheet.

You can also refer to the User Manual for further details, from here