Monday, December 21, 2009

Reporting Services saving excel in Excel 97 to Excel 2003 format

 













Thank goodness Sql Server Reporting Services 2008 saves to Excel as FileFormat 56 – e.g. the old but compatible version of excel from 97 through to 2003.

The principle file format enumerations in Excel 2007 are:

  • 51 = xlOpenXMLWorkbook (macro-free Excel 2007 workbook, .xlsx)
  • 52 = xlOpenXMLWorkbookMacroEnabled (Excel 2007 workbook with or without macros, .xlsm)
  • 50 = xlExcel12 (Excel 2007 binary formatted workbook, with or without macros, .xlsb)
  • 56 = xlExcel8 (Excel 97 through Excel 2003 formatted files used in Excel 2007, .xls)
  • 6 = .csv
  • -4158 = text
Just go into the vba window (alt-F11) after opening the workbook and type thisworkbook.FileFormat.

Regards,

Tom Bizannes
Excel development
Sydney, Australia
http://www.macroview.com.au