Use Parameters in a Data Extraction API Request

You can create a URI with a parameter instead of a specific value.

You can link a parameterized value to a cell so that the value updates when the worksheet is refreshed. To view multiple time periods for a report, you could create a single URI with a parameterized time period, so that Excel prompts you to change the time period value when you refresh the data.

  1. Use Generator to create a URI for the report you want. Specify the HTML format (recommended), and ensure that you have a valid start period and end period for the report (data may not exist for all time periods).
  2. Follow the instructions in Import data into Excel with the URI.
  3. Identify the value in the URI that you want to change to a parameter. The time period value is shown below:

  4. Copy the URI, and edit the copy of the URI to replace the values with parameter names of your choice, enclosed in square brackets:[“Date”,“Enter a Date”]&format=html&suppress_error_codes=true

  5. Use the URI in an Excel data import. You can link a parameterized value to a cell so that it updates when you refresh the data, or automatically, when cell content changes.
    Option Description
    Create a new import Follow the steps in Import data into Excel, using the parameter URI and the Refresh All option.
    Change a query Edit an existing connection query, changing the query string to the parameter URI.

    Excel 2007 and 2010 logos.On preview, an invalid page request error occurs. Ignore this and click Import.

    This prompt appears: