Connecting Excel to Salesforce
Devart Excel Add-in for Salesforce allows you to connect Excel to Salesforce databases, retrieve and load live Salesforce data to Excel, and then modify these data and save changes back to Salesforce. Here is how you can connect Excel to Salesforce and load Salesforce data to Excel in few simple steps.
To start linking Excel to Salesforce, on the ribbon, click the DEVART tab and then click the Get Data button. This will display the Import Data wizard, where you need to create Excel Salesforce connection and configure query for getting data from Salesforce to Excel:
1. Specify Connection Parameters
To link Excel to Salesforce, first select the authentication Our Salesforce Excel connector supports two authentication types for Salesforce: AccessRefreshToken and UserNamePassword.
If you want to connect Excel to a sandbox environment (test.salesforce.com) or to Database.com, you also need to select the corresponding Host. Or, if you connect to a custom environment, just type the corresponding host in this box.
For AccessRefreshToken authentication, click Web Login and sign in to your Salesforce account. Other required parameters are filled automatically. This authentication does not store Salesforce user name and password. Instead it uses an OAuth authentication token, which can be revoked at any time in Salesforce.For UserNamePassword authentication, you need to enter the necessary connection parameters in the Connection Editor dialog box, in addition to Host:
- User Id - your Salesforce account email.
- Password - your Salesforce password.
- Security Token - Salesforce security token - an automatically generated key that is used to log into Salesforce from an untrusted network. To generate the security token, login to the Salesforce website, click Setup, then select My Personal Information -> Reset My Security Token.
If you need to configure your Excel Salesforce connector in more details, you can optionally click the Advanced button and configure advanced connection parameters. There you can configure connection encryption, resiliency parameters, etc.
To check whether you have connected Excel to Salesforce correctly, click the Test Connection button.
2. Select whether to Store Connection in Excel Workbook
You may optionally change settings how the connection and query data are stored in the Excel workbook and in Excel settings:
- Allow saving add-in specific data in Excel worksheet - clear this check box in case you don't want to save any Excel add-in specific data in the Excel worksheet - connections, queries, etc. In this case, if you want to reload data from Salesforce to Excel or save modified data back to Salesforce, you will need to reenter both the connection settings and query.
- Allow saving connection string in Excel worksheet - clear this check box if you want your Salesforce connection parameters not to be stored in the Excel. In this case you will need to reenter your connection settings each time you want to reload Salesforce data or modify and save them to Salesforce. However, you may share the Excel workbook, and nobody will be able to get any connection details from it.
- Allow saving password - it is recommended to clear this check box. If you don't clear this check box, all the connection settings, including your Salesforce password, will be stored in the Excel workbook. And anyone having our Excel Add-in for SQL Server and the workbook will be able to link Excel to the Salesforce, get data from it, and modify them. But in this case you won't need to reenter anything when reloading data from Salesforce to Excel or saving them to Salesforce.
- Allow reuse connection in Excel - select this check box if you want to save this connection on your computer and reuse it in other Excel workbooks. It does not affect saving connection parameters in the workbook itself. You need to specify the connection name, and after this you will be able to simply select this connection from the list
3. Configure Query to Get Data
You may either use Visual Query Builder to configure it visually, or switch to the SQL Query tab and type the SQL Query. To configure query visually, do the following:
In the Object list select the Salesforce table to load its data to Excel.
In the tree below clear check boxes for the columns you don't want to import data from.
Optionally expand the relation node and select check boxes for the columns from the tables referenced by the current table's foreign keys to add them to the query.
In the box on the right you may optionally configure the filter conditions and ordering of the imported data and specify the max number of rows to load from Salesforce to Excel. For more information on configuring the query you may refer to our documentation, installed with the Excel Add-ins.
After specifying the query, you may optionally click Next and preview some of the first returned rows. Or click Finish and start data loading. In this way you can easily export Salesforce Contacts or other data to Excel.