One of the major new features in SQL Server Reporting Services (SSRS) 2012 is the ability to render Excel files and Word files in the XML based 2007 file format (.xlsx and .docx). Previous versions of SSRS rendered Excel and Word files into the old 2003 formats (.xls and .doc) Creating one of these output files can be done through the reporting UI by using the Export button. The new formats are used automatically, and you need to perform server configuration in order to use the older formats.
However, if you are using the Reporting Services web service, nothing changes. The Render method of the ReportExecution2005 web service would appear something like below:
report = rs.Render("EXCEL", deviceinfo, _
extension, mimeType, encoding, warnings, streamIDs)
The first argument is the file format to render into. With SSRS, the above code will render into the 2003 file format (.xls). The web service defaults to the old format.
I was unable to find any documentation at all on the correct argument to get the new file formats, so I poked around a little with my debugger and the ListRenderingExtensions method. As a result, I thought I’d share what I think is the comprehensive list of rendering formats for Reporting Services in SQL Server 2012. These are taken straight from the code.
|
Name |
Description |
|
XML |
XML file with report data |
|
NULL |
Null Renderer |
|
CSV |
CSV (comma delimited) |
|
ATOM |
Data Feed |
|
|
|
|
RGDI |
Remote GDI+ file |
|
HTML4.0 |
HTML 4.0 |
|
MHTML |
MHTML (web archive) |
|
EXCEL |
Excel 2003 |
|
EXCELOPENXML |
Excel |
|
RPL |
RPL Renderer |
|
IMAGE |
TIFF file |
|
WORD |
Word 2003 |
|
WORDOPENXML |
Word |
Therefore, if I want to render to the description “Excel” the argument needs to be “EXCELOPENXML”, and to render to the description “Excel 2003” the argument is “EXCEL”. That’s not at all confusing.
In any event, hopefully this helps someone (likely me in the future..)
