Salesforce SOQL from Apache OpenOffice
The Salesforce ODBC driver extends the number of applications that you can use Salesforce SOQL from.
To get started:
- Install and license the Salesforce ODBC driver on the machine where Microsoft Office is installed.
Before you can use the Salesforce ODBC driver to connect your application to Salesforce, you need to configure an ODBC data source. An ODBC data source stores the connection details for the target database (in this case, Salesforce) and the ODBC driver that is required to connect to it (in this case, the Salesforce ODBC driver).
To run ODBC Data Source Administrator (which you use to create a data source), in the Windows Run dialog box, enter this command if you are using a 64-bit version of Apache OpenOffice:
%windir%\system32\odbcad32.exe
–Or–
Enter this command if you are using a 32-bit version of Apache OpenOffice:
%windir%\syswow64\odbcad32.exe
To create a Salesforce ODBC driver data source:
- In ODBC Data Source Administrator, choose the System DSN tab, and then choose Add.
- In the Create New Data Source dialog box, choose Easysoft Salesforce SOQL ODBC Driver, and then choose Finish.
- Complete the DSN Setup dialog box:
Setting Value DSN Salesforce User Name The name of your Salesforce user. For example, myuser@mydomain.com
.Password The password for your Salesforce user. Token The security token for your Salesforce user, if required. To find out whether you need to supply a security token, choose the Test button. If the connection attempt fails with an error which contains
LOGIN_MUST_USE_SECURITY_TOKEN
, you need to supply one.Salesforce emails the security token to the email address associated with your Salesforce user account. If you have not received a security token, you can regenerate it. Salesforce will then email the new security token to you. To regenerate your security token, log in to Salesforce and then choose Setup from the user menu. Search for "security token" in the Quick Find box. Choose Reset Security Token in the Reset Security Token page. When you receive the token in your email client, copy it and then paste it into the Token field.
- Use the Test button to verify that you can successfully connect to Salesforce.
OpenOffice Base
Using the Salesforce ODBC driver to access Salesforce data with the OpenOffice Database Wizard:
- Open OpenOffice Base.
- In the Database Wizard, choose Connect to an existing database, and then choose ODBC. Choose Next.
- Browse for your ODBC data source, and then choose Next.
- Choose Next, the ODBC data source contains a user name and password, there's no need to re-enter them.
- Choose Finish, and then save your database when prompted.
- In the OpenOffice Base window, right-click the
Account
table and choose Open.
Using the Salesforce ODBC driver to work with Salesforce data by using SOQL in a pass-through query:
- Open the OpenOffice Base database you created by following the previous instructions.
- Choose Queries.
- Right-click the Query tab, and then choose SQL View.
- Enter your SOQL statement in the Query pane. For example:
SELECT Account.Name, (SELECT Contact.LastName FROM Account.Contacts) FROM Account
- Choose the Run Query button.
OpenOffice Calc
Using the Salesforce ODBC driver to access Salesforce data from Calc:
- Create a new Calc spreadsheet.
- On the View menu, choose Data Source.
- Expand the Tables or Queries for a Base database that uses a Salesforce ODBC driver data source for its data.
- Drag the Table or Query to the Calc worksheet to retrieve the Salesforce data.