Export formats

Format of exported data.

The format to use can depend on the chosen export Delivery method.

  • For internal exports, ones where the User initiates the export from a Report, the user chooses the format to use. However, the choices available are defined by the Available export formats option when the Delivery method is a Filter.

  • For external reports, such as email or FTP, the format is specified by the Export format property. This property is only available for external delivery methods.

Warning: A CSV Injection attack can happen when a survey taker injects malicious code into text comment fields that end up inside an Excel/CSV export files downloaded by a user.

Export format options

These are the formats available to use for exported data.

Warning: As of the Fall 2023.3 release, files exported as CSV, pipe, and tab delimited formats start with a tab character for field values beginning with =, +, -, or @. For example, -100 changes to \t-100 (ASCII 9 for tab). This mitigates a security risk that could allow code malicious injection into spreadsheet programs. Applications processing CSV files must comply with RFC-4180 and should trim whitespace from field values before use — that is, remove surrounding whitespace (tab, newline, or space characters) before using the value. For more information, see CWE-1236.
CSV (Excel compatible)
Comma-separated values (CSV); may contain line-breaks in field values.

Each line is a record of comma-separated fields; the line ends with LF. Text fields are surrounded by quotes ("). Accepts line breaks embedded in text fields, such as when a customer presses Enter in a comment field. For details, see CSV files.

Double quotes ("") inside text fields are escaped with double quotes, creating pairs of double quotes (2 double quotes). For instance: when a customer enters Service was "good" but could be better., the CSV export is "Service was ""good"" but could be better.".

Tip: When exporting customer-supplied text, use regex to strip or transform commas in those text fields. See Escape regular expression for details.
Warning: When importing CSV (Excel-compatible) exports into Microsoft Azure, note that Azure defaults the escape character to a backslash (\). In Azure, change the escape character to a double quote (").
CSV (single line)
Comma-separated values (CSV) with no line-breaks in field values. Otherwise, format is the same a CSV (Excel compatible). For details, see CSV files.
Excel 2007
XML in Open Office XML format (.xlsx). This output uses the format specified by the Excel template property, described below.
To upload a template:
  1. Click Choose File and select the xslx file to upload.

  2. Click Save.

To delete an existing file:
  1. Tic Delete.

  2. Click Save.

To replace an existing template:
  1. Delete the existing template.

  2. Upload the new template.

When using this format, set Enumerates alternative set format to Numeric or Name; otherwise, numbers will appear in text format and users will not be able to carry out numerical calculations on the export.

Excel 2007 files have these limitations. Exceeding them can cause an event ticket and a failure of the export.
  • 1,048,576 rows

  • 16,384 columns

  • 32,767 characters in a cell

Warning: Do not exceed these limits or undesirable results will occur. Don't ask and don't do it!
Pipe-delimited (Excel compatible)
Multi-line pipe (|) separated values; may contain line-breaks in field values. Same as CSV (Excel compatible) except the separator is a vertical bar instead of a comma. For details, see CSV files.
SPSS
IBM SPSS Statistics (.sav), version 19 or later.

When using this format, set Enumerates alternative set format to Name.

The export process transforms field names to be SPSS compliant as follows:

  • Strip invalid characters: no spaces; names start with letter or @; no embedded punctuation except @, $, #, ., and _; names cannot end with . or _.

  • After stripping invalid characters, if the value is empty, use “EMPTY_STRING” for the name.

  • Truncate the name to the first 64 characters (single-byte) or 32 for multi-byte.

  • If there are any duplicate names, append _# to the name, where ‘#’ is an integer that makes the name unique.

File size and download time are determined by the count of records in the export and the count of fields per record. Very large exports can cause the database to time-out. To test the export, make a sample download (such with the Response filter) and verify the resulting file size is greater than 0 KB.

Large exports of tens or hundreds of thousands of records with over 200 columns can take several minutes to complete.

SPSS files have a limit of 350k records. Exceeding that limit can throw an event ticket and cause the export to fail.

String Template (for custom formatting)
Text output using custom formatting. See String templates for details.
Restriction: As of the Summer 2023 release, the ability to set up exports using StringTemplate is deprecated. Customers that had StringTemplate exports prior to Summer 2023 may continue to use those exports, and they will also still be able to set up new ones using StringTemplate. If you require the use of StringTemplate, submit a Feature activation request so that Medallia teams can validate the use of this now-deprecated feature.
Tab-delimited (Excel compatible)
Multi-line tab separated values; may contain line-breaks in field values. Same as CSV (Excel compatible) except the separator is a tab character instead of a comma. For details, see CSV files.
TA Export Data CSV (Excel compatible)
Same as CSV (Excel compatible), except that a new row is included for each unique topic, theme, or word (depending on the option chosen for the Text Analytics Data to Export property), and each unique sentiment tagging. The fields in each row include:
  • Survey ID — ID assigned to each survey record. Comments with identical survey IDs are from the same survey record.
    Important: Beginning with the Winter 2020 release, the length of Survey IDs is increased to 64 bits (values can be greater than 2 billion). Make sure that your application can handle these values for Survey ID fields. Consider storing these values as text or as a big integer (signed 2's-compliment 64-bit integer).
  • Field — Name of the comment Q-field.
  • Comment — Survey comment.
  • Phrase — A sentence from the comment.
  • Topic, Theme, or Word — The topic, theme, or word assigned to the sentence in the Phrase column.
    Note: A single comment can be tagged by multiple topics and themes.
  • Sentiment — The sentiment assigned to the sentence in the Phrase column.
Tip: Data for this format is exported at the phrase level (not the record level).

See Exporting Text Analytics data for more details.

TA Export Data Pipe-delimited (Excel compatible)
Same as Pipe-delimited (Excel compatible), except that a new row is included for each unique topic, theme, or word (depending on the option chosen for the Text Analytics Data to Export property), and each unique sentiment tagging. The fields in each row include:
  • Survey ID — ID assigned to each survey record. Comments with identical survey IDs are from the same survey record.
    Important: Beginning with the Winter 2020 release, the length of Survey IDs is increased to 64 bits (values can be greater than 2 billion). Make sure that your application can handle these values for Survey ID fields. Consider storing these values as text or as a big integer (signed 2's-compliment 64-bit integer).
  • Field — Name of the comment Q-field.
  • Comment — Survey comment.
  • Phrase — A sentence from the comment.
  • Topic, Theme, or Word — The topic, theme, or word assigned to the sentence in the Phrase column.
    Note: A single comment can be tagged by multiple topics and themes.
  • Sentiment — The sentiment assigned to the sentence in the Phrase column.
Tip: Data for this format is exported at the phrase level (not the record level).
See Exporting Text Analytics data for more details.
Tip: Users sometimes report problems with the files not appearing correctly when loaded into their application, such Excel or Text Wrangler. This usually happens when the user double-clicked or used File>Open to open the file. To avoid these problems, import the file (File>Import) and select the appropriate file type and formatting.

Normalized exports

Note: This option is only available for CSV (Excel compatible) and Excel 2007 export formats.

When using this format, each survey field will be exported on a separate row that will be identified by user-selected key fields.

Screen capture highlighting the checkbox that you need to select to normalize the export.

For example, the following image shows an exported file where a_surveyid and e_responsedate were selected as key fields.

Image showing normalized export file where survey ID and response date were selected as key fields

Excel template

An Excel template customizes the appearance of exports in the Excel 2007 Export format (xslx). Upload a template with the Excel template option. When there is no custom template in effect, the system uses the default template.

Excel default template and example custom template

A template file is an Excel .xlsx file with content in the first four rows.

RowDescriptionDefault
1 & 2Custom text, formatted. Useful for titles and instructions.Cell A1 says “Survey Export” in large, bold text.
3Column headings (field names), formatted text.

Note: These labels must be updated as fields are added, deleted, or rearranged in the export specification.

Field name format property, in bold text.
4 ...Record values. Each field in each record adopts the formatting of the corresponding cell in Row 4.
Note: The Field name value property has priority over the numeric formatting in the template.
Unformatted.

In addition to basic formatting like date and number formats, alignment, color, and font attributes, cells can have conditional formatting, such as to change the background color based on the cell’s value. The custom output in the example above was created with this template:

Custom Excel template with conditional formatting on the Ltr field/column and a formatted date

Creating a template

To create a custom Excel template staring from the default template:

  1. Export a survey using the default template.

  2. Rename the file to something appropriate like my-xsl-template.xslx.

  3. Open the xslx file in Excel.

  4. Define and format the literal text in rows 1 and 2.

    • Change and add text as desired.

    • Format the text and cells.

  5. Format the header cells in row 3. For example maybe make all cells in row 3 bold with a light-blue background.

  6. Delete row 5 and every row through the last record — leave the record data in row 4! The result a worksheet with the desired columns and sample data in row 4.
  7. Format the sample data in row 4.

    • Format any numbers, dates, and text

    • Apply any conditional formatting.

  8. Save the file.

  9. Upload the template the Excel template option.

  10. Create a new export using the template.

    • If you need to make changes, modify the template in Excel, save it, re-upload the change template, and repeat this step until you have the desired results.

Here are some things to be aware of when using an Excel template:

  • Always check the generated file on appropriate versions of Excel to be used by the client. Especially be aware of formatting and color differences.
  • Use “safe” or “standard” colors. The Excel color palette for background colors varies from between versions, for example, some colors in Excel 2007 are not supported in Excel 2010.
  • Templates do not accept rich text formatting: HTML cannot be used.
  • Hyperlinks can cause issues.

Here is an xslx template you can use as a starting point: DOWNLOAD