FileFormat Property

Applies To

Workbook object.

Description

Returns the file format and/or type of the workbook. Read-only Long.

Can be one of the following XlFileFormat constants:

  • xlAddIn
  • xlCSV
  • xlCSVMac
  • xlCSVMSDOS
  • xlCSVWindows
  • xlCurrentPlatformText
  • xlDBF2
  • xlDBF3
  • xlDBF4
  • xlDIF
  • xlExcel2
  • xlExcel2FarEast
  • xlExcel3
  • xlExcel4
  • xlExcel4Workbook
  • xlExcel5
  • xlIntlAddIn
  • xlIntlMacro
  • xlSYLK
  • xlTemplate
  • xlTextMac
  • xlTextMSDOS
  • xlTextPrinter
  • xlTextWindows
  • xlWJ2WD1
  • xlWJ3
  • xlWJ3FJ3
  • xlWK1
  • xlWK1ALL
  • xlWK1FMT
  • xlWK3
  • xlWK3FM3
  • xlWK4
  • xlWKS
  • xlWorkbookNormal
  • xlWorks2FarEast
  • xlWQ1

Remarks

The following additional formats are available in the Far East version of Microsoft Excel: xlWJ2WD1, xlExcel2FarEast, and xlWorks2FarEast.

Example

This example saves the active workbook in Normal file format if its current file format is WK3.

If ActiveWorkbook.FileFormat = xlWK3 Then
    ActiveWorkbook.SaveAs fileFormat:=xlNormal
End If