XlFileFormat for excel 2010 file

Saboor Awan picture Saboor Awan · Sep 9, 2011 · Viewed 11.1k times · Source

I want to create a excel 2010 file from C# so what will be the XlFileFormat Enumeration for it.

http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.xlfileformat.aspx

Answer

David Heffernan picture David Heffernan · Sep 9, 2011
  • xlOpenXMLWorkbook for a .xlsx macro free workbook.
  • xlOpenXMLWorkbookMacroEnabled for a .xlsm macro enabled workbook.

The key piece of knowledge is that the new Office 2007 file formats are called Office Open XML.