Dutch Gemini's Weblog Pages

November 30, 2009

Excel 2007 and the lost ‘xlFileFormat.xlXMLData’ Enum

Filed under: Excel,Programming,VBA — dutchgemini @ 5:19 pm

In Excel 2007, the xlFileFormat enum called xlXMLData with value 47 that was introduced with Excel 2003, has disappeared.

The xlFileFormat enum can be used with the .SaveAs method to save a file to a file format different than the actual workbook, for instance if you need to save to an older or newer format.

These are the current enums I was able to trace for the xlFileFormat enum, from Excel 2000 up to Excel 2007 which should also cover Excel 2010 (according to this page: http://msdn.microsoft.com/en-us/library/microsoft.office.interop.excel.xlfileformat.aspx).

In Bold the first appearance after Excel 2000, in Red the ones that were introduced but are now missing.

Excel 2000 Excel 2002/XP Excel 2003 Excel 2007 (and Excel 2010) Value Description
xlAddIn xlAddIn xlAddIn xlAddIn 18 Microsoft Excel 97-2003 Add-In
  xlAddIn8 18 Microsoft Excel 97-2003 Add-In
xlCSV xlCSV xlCSV xlCSV 6 CSV
xlCSVMac xlCSVMac xlCSVMac xlCSVMac 22 Macintosh CSV
xlCSVMSDOS xlCSVMSDOS xlCSVMSDOS xlCSVMSDOS 24 MSDOS CSV
xlCSVWindows xlCSVWindows xlCSVWindows xlCSVWindows 23 Windows CSV
xlCurrentPlatformText xlCurrentPlatformText xlCurrentPlatformText xlCurrentPlatformText -4158 Current Platform Text
xlDBF2 xlDBF2 xlDBF2 xlDBF2 7 DBF2
xlDBF3 xlDBF3 xlDBF3 xlDBF3 8 DBF3
xlDBF4 xlDBF4 xlDBF4 xlDBF4 11 DBF4
xlDIF xlDIF xlDIF xlDIF 9 DIF
  xlExcel12 50 Excel12
xlExcel2 xlExcel2 xlExcel2 xlExcel2 16 Excel2
xlExcel2FarEast xlExcel2FarEast xlExcel2FarEast xlExcel2FarEast 27 Excel2 FarEast
xlExcel3 xlExcel3 xlExcel3 xlExcel3 29 Excel3
xlExcel4 xlExcel4 xlExcel4 xlExcel4 33 Excel4
xlExcel4Workbook xlExcel4Workbook xlExcel4Workbook xlExcel4Workbook 35 Excel4 Workbook
xlExcel5 xlExcel5 xlExcel5 xlExcel5 39 Excel5
xlExcel7 xlExcel7 xlExcel7 xlExcel7 39 Excel7
  xlExcel8 56 Excel8
xlExcel9795 xlExcel9795 xlExcel9795 xlExcel9795 43 Excel9795
xlHTML xlHtml xlHtml xlHtml 44 HTML format
xlIntlAddIn xlIntlAddIn xlIntlAddIn xlIntlAddIn 26 International Add-In
xlIntlMacro xlIntlMacro xlIntlMacro xlIntlMacro 25 International Macro
  xlOpenDocumentSpreadsheet 60 OpenDocument Spreadsheet
  xlOpenXMLAddIn 55 Open XML Add-In
  xlOpenXMLTemplate 54 Open XML Template
  xlOpenXMLTemplateMacroEnabled 53 Open XML Template Macro Enabled
  xlOpenXMLWorkbook 51 Open XML Workbook
  xlOpenXMLWorkbookMacroEnabled 52 Open XML Workbook Macro Enabled
xlSYLK xlSYLK xlSYLK xlSYLK 2 SYLK
xlTemplate xlTemplate xlTemplate xlTemplate 17 Template
  xlTemplate8 17 Template 8
xlTextMac xlTextMac xlTextMac xlTextMac 19 Macintosh Text
xlTextMSDOS xlTextMSDOS xlTextMSDOS xlTextMSDOS 21 MSDOS Text
xlTextPrinter xlTextPrinter xlTextPrinter xlTextPrinter 36 Printer Text
xlTextWindows xlTextWindows xlTextWindows xlTextWindows 20 Windows Text
xlUnicodeText xlUnicodeText xlUnicodeText xlUnicodeText 42 Unicode Text
  xlWebArchive xlWebArchive xlWebArchive 45 Web Archive
xlWJ2WD1 xlWJ2WD1 xlWJ2WD1 xlWJ2WD1 14 WJ2WD1
xlWJ3 xlWJ3 xlWJ3 xlWJ3 40 WJ3
xlWJ3FJ3 xlWJ3FJ3 xlWJ3FJ3 xlWJ3FJ3 41 WJ3FJ3
xlWK1 xlWK1 xlWK1 xlWK1 5 WK1
xlWK1ALL xlWK1ALL xlWK1ALL xlWK1ALL 31 WK1ALL
xlWK1FMT xlWK1FMT xlWK1FMT xlWK1FMT 30 WK1FMT
xlWK3 xlWK3 xlWK3 xlWK3 15 WK3
xlWK3FM3 xlWK3FM3 xlWK3FM3 xlWK3FM3 32 WK3FM3
xlWK4 xlWK4 xlWK4 xlWK4 38 WK4
xlWKS xlWKS xlWKS xlWKS 4 Worksheet
  xlWorkbookDefault 51 Workbook default
xlWorkbookNormal xlWorkbookNormal xlWorkbookNormal xlWorkbookNormal -4143 Workbook normal
xlWorks2FarEast xlWorks2FarEast xlWorks2FarEast xlWorks2FarEast 28 Works2 FarEast
xlWQ1 xlWQ1 xlWQ1 xlWQ1 34 WQ1
  xlXMLData   47  
  xlXMLSpreadsheet xlXMLSpreadsheet xlXMLSpreadsheet 46 XML Spreadsheet

Dutch.

Advertisements

5 Comments »

  1. This is very helpful !

    I was wondering if your predictions were right : Are the 2007 flags used for Excel 2010 ?

    Thanks !

    Comment by GuiSim — May 20, 2010 @ 6:30 pm | Reply

    • According to Microsoft, yes. See link in text.

      Page updated.

      Dutch

      Comment by dutchgemini — May 21, 2010 @ 7:54 am | Reply

  2. Weeehou!

    Wow thanks! I’m working with clients with different version of Office and wasn’t able to find a hint of what format can be used with which version. Now that’s plain! 🙂

    Comment by Augustchau — December 15, 2010 @ 4:49 pm | Reply

  3. I was searching everywhere for this. Awesome. Excel 2000 Excel 2002/XP Excel 2003 Excel2007/2010 xlFileFormat Enum

    Comment by Pang — July 25, 2011 @ 12:16 pm | Reply

  4. I dont think all of the listed formats can be saved — only opened

    Comment by drgs — July 13, 2012 @ 3:22 pm | Reply


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: