Excel Spreadsheet Automation with the QUERY Formula



Pull data, automate spreadsheets, and more with the QUERY formula.

The CData Excel Add-In for Workday provides formulas that can edit, save, and delete Workday data. The following three steps show how you can automate the following task: Search Workday data for a user-specified value and then organize the results into an Excel spreadsheet.

About Workday Data Integration

CData provides the easiest way to access and integrate live data from Workday. Customers use CData connectivity to:

  • Access the tables and datasets you create in Prism Analytics Data Catalog, working with the native Workday data hub without compromising the fidelity of your Workday system.
  • Access Workday Reports-as-a-Service to surface data from departmental datasets not available from Prism and datasets larger than Prism allows.
  • Access base data objects with WQL, REST, or SOAP, getting more granular, detailed access but with the potential need for Workday admins or IT to help craft queries.

Users frequently integrate Workday with analytics tools such as Tableau, Power BI, and Excel, and leverage our tools to replicate Workday data to databases or data warehouses. Access is secured at the user level, based on the authenticated user's identity and role.

For more information on configuring Workday to work with CData, refer to our Knowledge Base articles: Comprehensive Workday Connectivity through Workday WQL and Reports-as-a-Service & Workday + CData: Connection & Integration Best Practices.


Getting Started


The syntax of the CDATAQUERY formula is the following: =CDATAQUERY(Query, [Connection], [Parameters], [ResultLocation]);

This formula requires three inputs:

  • Query: The declaration of the Workday data records you want to retrieve or the modifications to be made, written in standard SQL.
  • Connection: Either the connection name, such as WorkdayConnection1, or a connection string. The connection string consists of the required properties for connecting to Workday data, separated by semicolons.

    To connect to Workday, users need to find the Tenant and BaseURL and then select their API type.

    Obtaining the BaseURL and Tenant

    To obtain the BaseURL and Tenant properties, log into Workday and search for "View API Clients." On this screen, you'll find the Workday REST API Endpoint, a URL that includes both the BaseURL and Tenant.

    The format of the REST API Endpoint is: https://domain.com/subdirectories/mycompany, where:

    • https://domain.com/subdirectories/ is the BaseURL.
    • mycompany (the portion of the url after the very last slash) is the Tenant.
    For example, in the REST API endpoint https://wd3-impl-services1.workday.com/ccx/api/v1/mycompany, the BaseURL is https://wd3-impl-services1.workday.com and the Tenant is mycompany.

    Using ConnectionType to Select the API

    The value you use for the ConnectionType property determines which Workday API you use. See our Community Article for more information on Workday connectivity options and best practices.

    APIConnectionType Value
    WQLWQL
    Reports as a ServiceReports
    RESTREST
    SOAPSOAP

    Authentication

    Your method of authentication depends on which API you are using.

    • WQL, Reports as a Service, REST: Use OAuth authentication.
    • SOAP: Use Basic or OAuth authentication.

    See the Help documentation for more information on configuring OAuth with Workday.

  • ResultLocation: The cell that the output of results should start from.

Pass Spreadsheet Cells as Inputs to the Query

The procedure below results in a spreadsheet that organizes all the formula inputs in the first column.

  1. Define cells for the formula inputs. In addition to the connection inputs, add another input to define a criterion for a filter to be used to search Workday data, such as Legal_Name_Last_Name.
  2. In another cell, write the formula, referencing the cell values from the user input cells defined above. Single quotes are used to enclose values such as addresses that may contain spaces.
  3. =CDATAQUERY("SELECT * FROM Workers WHERE Legal_Name_Last_Name = '"&B6&"'","User="&B1&";Password="&B2&";Tenant="&B3&";BaseURL="&B4&";ConnectionType="&B5&";Provider=Workday",B7)
  4. Change the filter to change the data.

Ready to get started?

Download a free trial of the Excel Add-In for Workday to get started:

 Download Now

Learn more:

Workday Icon Excel Add-In for Workday

The Workday Excel Add-In is a powerful tool that allows you to connect with live Workday data, directly from Microsoft Excel.

Use Excel to read, write, and update Workday Cash Management, Compensation, Financial Management, Payroll, etc. Perfect for mass imports / exports / updates, data cleansing & de-duplication, Excel based data analysis, and more!