Share via


Exporting a Report as a CSV File (Report Builder 1.0)

The Comma-Separated Value (CSV) export option saves report data as comma-delimited plain text files, without any formatting. The file uses a comma (,) to delimit fields and rows. The resulting file can be opened in a spreadsheet program like Office SharePoint Server  or used as an import format for other programs. By default, the .csv file opens in Notepad. If accessed as a URL, the .csv file returns a MIME type of text/plain. The files are MIME version 1.0.

CSV Rendering

When exported, a Report Builder report has the following characteristics when saved and opened as a CSV file:

  • The first text line of the file contains headers for all the columns in the report.

  • All rows have the same number of columns.

  • The field delimiter string is a comma (,).

  • The record delimiter string is an invisible carriage return and line feed (<cr><lf>).

  • The text qualifier string is a quotation mark (").

  • If the text contains a quotation mark, that quotation mark is doubled ("").

  • If the exported report is a table, at the end of each row is a number that indicates the number of rows returned in the report. For example, if 330 rows are returned in the report, the number 330 appears at the end of each row in the .csv file.

  • Formatting and layout are ignored.

  • Fields that contain images as data are ignored.

The remaining report items are sorted, from top to bottom, and then left to right. Each item is then saved to a column.

The following table lists the considerations applied to items when exporting to a CSV file.

Item

Save behavior

Text box

Saves the contents of the text box. The data is formatted according to the item's Format property.

Table

Saves by expanding the table and creating a row and column for each row and column at the lowest level of detail. Subtotal rows and columns do not have column or row headings. Clickthrough reports are not supported.

Matrix

Saves by expanding the matrix and creating a row and column for each row and column at the lowest level of detail. Subtotal rows and columns do not have column or row headings. Clickthrough reports are not supported.

Chart

Saves a row for one set of the data values, and columns for the other set of data values. Clickthrough reports are not supported.

Note

The structure of the matrix data region in CSV files might change in upcoming releases of Reporting Services.