xlExcel8 is the Excel VBA file-format constant for an Excel 97-2003 Workbook (.xls), and its numeric value is 56. That answer is simple; the risk behind it is not. Saving a modern workbook with FileFormat:=xlExcel8 moves the file into the older BIFF8 format, where a worksheet is limited to 65,536 rows and 256 columns and newer Excel features can be downgraded, removed, or made non-refreshable (Microsoft, 2021a; Microsoft, n.d.-a).
The constant appears most often in VBA SaveAs code, COM automation, Access-to-Excel scripts, and legacy integrations that must produce .xls files. Microsoft’s XlFileFormat enumeration maps xlExcel8 to value 56 and the .xls extension, while Workbook.SaveAs accepts that enumeration through its FileFormat argument (Microsoft, 2021a, 2021b). Developers who want a broader foundation in variables, constants, objects, and debugging can use our basic coding concepts guide as a companion reference.
ActiveWorkbook.SaveAs Filename:=”C:\Reports\output.xls”, FileFormat:=xlExcel8
ActiveWorkbook.SaveAs Filename:=”C:\Reports\output.xls”, FileFormat:=56
Those two statements target the same format. The important question is not merely “what number is the constant?” but “should this workbook be converted to Excel 97-2003 format at all?” A correct SaveAs call can still create an operational problem if the workbook contains data beyond the old grid, Power Query connections, modern formulas, or features that do not survive Compatibility Mode. This guide shows safe VBA patterns, separates .xls from .xlsx/.xlsm/.xlsb, and provides a decision process for legacy export without silently losing workbook capability.
What xlExcel8 Actually Means
The enumeration member is defined by Microsoft as value 56, “Excel 97-2003 Workbook,” with the .xls extension (Microsoft, 2021a). The “8” comes from Excel 97 being version 8; Excel 97 through Excel 2003 used the BIFF8 binary workbook format. Microsoft’s supported-file-formats documentation likewise identifies .xls as the Excel 97-2003 BIFF8 format (Microsoft, n.d.-b).
The naming can feel strange in 2026 because “Excel 8” sounds like one historical release, while the constant represents the broader Excel 97-2003 .xls family. Practitioner explanations match the official mapping. On Stack Overflow, Excel specialist Hans Passant summarized the naming logic with the concise observation, “Excel 97 was version 8.” In a separate SaveAs answer, Excel MVP Siddharth Rout wrote, “For .xls it is xlExcel8” (Passant, 2012; Rout, 2013).
| Format | VBA constant | Value | Extension |
| Excel 97-2003 Workbook | BIFF8 constant | 56 | .xls |
| Excel Workbook | xlOpenXMLWorkbook | 51 | .xlsx |
| Excel Macro-Enabled Workbook | xlOpenXMLWorkbookMacroEnabled | 52 | .xlsm |
| Excel Binary Workbook | xlExcel12 | 50 | .xlsb |
Changing only the filename extension does not change the underlying workbook format. A file named .xls but written with an Open XML format value has an extension/content mismatch and can trigger warnings when reopened. That is why format selection should be treated as a serialization decision, not a cosmetic filename choice.
The Safe VBA SaveAs Pattern
The simplest correct pattern specifies both the destination extension and the matching file-format constant:
Sub SaveLegacyXls()
Dim targetPath As String
targetPath = “C:\Reports\MonthlyReport.xls”
ThisWorkbook.SaveAs _
Filename:=targetPath, _
FileFormat:=xlExcel8, _
CreateBackup:=False
End Sub
Workbook.SaveAs exposes many optional arguments, but Filename and FileFormat are the two that define the destination and workbook format. Microsoft notes that if FileFormat is omitted for a new workbook, Excel uses the format associated with the Excel version in use (Microsoft, 2021b). Explicit format selection is therefore safer when automation promises a specific output type.
For maintainable macros, avoid ActiveWorkbook when the code already has a workbook object. ActiveWorkbook can change if another workbook is opened, copied, or activated during the procedure. Assigning the object makes the target unambiguous. The same principle appears in reliable VBA error handling: make state explicit, reduce hidden dependencies, and capture failures at the point where they occur.
Dim wb As Workbook
Set wb = Workbooks.Add
wb.Worksheets(1).Range(“A1”).Value = “Legacy export”
wb.SaveAs Filename:=”C:\Reports\LegacyExport.xls”, FileFormat:=56
When Value 56 Is Useful in Late-Bound Automation
The numeric value matters when Excel is controlled from another application through late binding. In Access VBA, VBScript, PowerShell COM automation, or another host where the Excel type library is not referenced, the symbolic Excel enumeration may be undefined. The literal value can then be passed directly.
Set xlApp = CreateObject(“Excel.Application”)
Set wb = xlApp.Workbooks.Add
wb.SaveAs “C:\Reports\LegacyExport.xls”, 56
A clearer late-bound pattern defines the constant locally rather than scattering a magic number through the script:
Const xlExcel8 As Long = 56
wb.SaveAs “C:\Reports\LegacyExport.xls”, xlExcel8
This preserves readability while avoiding an early-bound dependency on the Excel object library. Do not generalize the technique into replacing every Excel constant with a number. Named constants are easier to audit inside Excel VBA; numeric values are most useful when the host cannot resolve Excel’s enumeration.
The Compatibility Cost of BIFF8
A SaveAs call can succeed and still produce a degraded workbook. Microsoft’s compatibility guidance shows the most important hard boundary: Excel 97-2003 supports only 65,536 rows by 256 columns. Modern Excel supports 1,048,576 rows by 16,384 columns. Data beyond the legacy grid is not saved to .xls, and formulas referring to that lost region can return #REF! errors (Microsoft, n.d.-a; Microsoft, n.d.-d).
The risk extends beyond sheet size. Microsoft warns that modern workbook features and formatting may not transfer when a file is saved to an earlier format. Power Query is a concrete example: Excel 97-2003 does not support modern Get & Transform capabilities, so imported query data cannot be refreshed in those earlier versions (Microsoft, n.d.-a). Formula-level compatibility should also be reviewed; our spreadsheet formulas guide explains how worksheet errors and function behavior can affect downstream models.
Before producing a legacy workbook, check:
- Whether any worksheet exceeds row 65,536 or column IV.
- Whether the workbook relies on Power Query or other modern data connections.
- Whether formulas or features introduced after Excel 2003 are business-critical.
- Whether VBA code must be preserved in the delivered file.
- Whether the receiving system truly cannot accept .xlsx, .xlsm, or .xlsb.
If the final answer to that list is “no,” a modern format is usually safer because the downgrade is no longer solving a real compatibility requirement.
How the Legacy Format Compares With Modern Excel Files
The correct file-format constant depends on what the receiving system needs, not on habit.
| Format | Value | Extension | Macro support | Best fit |
| Excel 97-2003 Workbook | 56 | .xls | Yes | Legacy systems requiring BIFF8 |
| Excel Workbook | 51 | .xlsx | No | Modern macro-free workbooks |
| Excel Macro-Enabled Workbook | 52 | .xlsm | Yes | Modern workbooks containing VBA |
| Excel Binary Workbook | 50 | .xlsb | Yes | Modern binary workbook workflows |
Microsoft’s file-format guidance states that .xlsx cannot store VBA macro code, while .xlsm is the macro-enabled XML format (Microsoft, n.d.-b). Microsoft also documents that the older .xls format preserves VBA code in Excel for Mac (Microsoft, n.d.-c). The implication is important: BIFF8 is not “the macro format.” It is a legacy binary format that can contain macros. For a modern workbook containing VBA, .xlsm is generally the format designed for that purpose.
The compatibility decision resembles choosing a newer lookup function versus an older broadly supported pattern. Our XLOOKUP guide makes the same trade-off explicit: modern capability is useful, but backward compatibility can still be a valid requirement when it is documented and intentional.
Five Failure Modes That Look Like SaveAs Problems
1. The extension does not match the format: A filename ending in .xlsx should not be paired with BIFF8 value 56. The extension and serialized workbook format should agree.
2. Compatibility warnings appear: Excel can warn that content will be lost or changed. Application.DisplayAlerts can suppress the prompt in unattended automation, but it does not make incompatible content compatible.
3. The constant is undefined outside Excel: Late-bound hosts may not know Excel enumeration names. Define a local constant equal to 56 or pass the numeric value.
4. The workbook saves, but data disappears: This is often a format-capability problem rather than a VBA syntax problem. Check worksheet dimensions, formulas, data connections, and Compatibility Checker findings.
5. The wrong workbook is saved: ActiveWorkbook can point to a workbook created or activated during the procedure. Store the intended Workbook object and call SaveAs on that object directly.
If alerts are suppressed, preserve and restore the original Application.DisplayAlerts value even when an exception occurs. Otherwise Excel can remain globally muted for the user’s session. The same state-restoration discipline matters for calculation mode, screen updating, and events.
A Production-Ready Legacy Export Routine
A safer export routine validates the old grid boundary and restores application state if the save fails:
Sub ExportAsXls(ByVal wb As Workbook, ByVal targetPath As String)
Dim ws As Worksheet
Dim oldAlerts As Boolean
On Error GoTo Fail
For Each ws In wb.Worksheets
If ws.UsedRange.Rows.Count > 65536 _
Or ws.UsedRange.Columns.Count > 256 Then
Err.Raise vbObjectError + 1001, “ExportAsXls”, _
“Workbook exceeds Excel 97-2003 worksheet limits.”
End If
Next ws
oldAlerts = Application.DisplayAlerts
Application.DisplayAlerts = False
wb.SaveAs Filename:=targetPath, FileFormat:=56
CleanExit:
Application.DisplayAlerts = oldAlerts
Exit Sub
Fail:
Dim n As Long, d As String
n = Err.Number
d = Err.Description
Application.DisplayAlerts = oldAlerts
Err.Raise n, “ExportAsXls”, d
End Sub
UsedRange can be inflated by old formatting, so a high-stakes export may need a more precise last-data-cell test. The core design remains useful: validate known hard limits before conversion, capture the current error before another operation changes it, restore global application state, and then re-raise an unexpected failure.
A Better Architecture: Export the Legacy Copy, Don’t Downgrade the Master
One of the least discussed risks is overwriting the working workbook with a legacy format. If a modern .xlsm file is saved in place as .xls, a delivery requirement can become a permanent architecture constraint. A safer pattern keeps the canonical workbook in its modern format and generates a separate legacy export.
- Master workbook: ReportModel.xlsm
- Delivery copy: Report_2026-09.xls
- Optional data-only interchange: Report_2026-09.csv
This separation protects modern formulas, model structure, and automation while still satisfying a downstream system that only accepts BIFF8. It also makes testing easier: the export can be reopened, counted, and compared against the master without changing the source.
If a workflow depends on recalculation before export, run the narrowest safe calculation step first and then validate the output. Our Application.Calculate VBA guide explains the difference between smart recalculation, full recalculation, and dependency rebuilds. Recalculation can refresh formulas, but it cannot recover rows or features discarded by an obsolete file format.
The Future of Legacy Excel Export in 2027
The BIFF8 selector is unlikely to become more capable in 2027 because its purpose is to represent a historical format, not a modern workbook target. Microsoft still documents .xls as a supported Excel 97-2003 format and continues to expose value 56 in the XlFileFormat enumeration (Microsoft, 2021a; Microsoft, n.d.-b). That keeps the format relevant for old line-of-business systems, archives, and workflows that have not migrated.
The pressure, however, runs in the opposite direction. Current Excel supports a much larger grid, modern data import through Power Query, newer functions, cloud collaboration, and newer automation models. Each conversion into BIFF8 creates a compatibility boundary that must be tested.
A practical 2027 strategy is dual-format architecture: preserve the source model in .xlsx, .xlsm, or .xlsb and create .xls only as a controlled delivery artifact where a recipient proves it is required. Teams should document the reason for the dependency, test each exported file, and assign a migration owner rather than allowing “we have always used .xls” to become permanent technical policy.
Key Takeaways
- The Excel 97-2003 SaveAs constant maps to value 56 and produces a .xls BIFF8 workbook.
- The filename extension and FileFormat value must agree; value 56 should normally be paired with .xls.
- BIFF8 is limited to 65,536 rows and 256 columns, so modern workbooks can lose data or functionality when downgraded.
- .xls can preserve VBA, but .xlsm is the modern macro-enabled workbook format and is usually the better choice when legacy compatibility is not mandatory.
- In late-bound automation, a locally defined constant equal to 56 is clearer than scattering the literal number through the code.
- Suppressing Excel alerts does not solve compatibility problems; it only suppresses the prompts that report them.
- Keep the master workbook in a modern format and generate .xls as a separate export whenever possible.
Conclusion
Value 56 solves one precise problem: telling Excel to save a workbook in the Excel 97-2003 BIFF8 .xls format. When used with Workbook.SaveAs, it remains a valid way to create legacy files for systems that still require them.
The more important engineering decision comes before the SaveAs line. BIFF8 carries hard worksheet limits and can strip or disable capabilities that modern Excel users take for granted. A successful export is therefore not automatically a correct export.
Use the legacy format only when a receiving system genuinely requires .xls. Match the extension to the file format, validate worksheet dimensions, review Compatibility Checker issues, preserve application state, and avoid overwriting the modern source workbook. If the recipient can accept a current format, choose .xlsx for macro-free workbooks, .xlsm for VBA-enabled workbooks, or .xlsb where a modern binary format fits the workflow. The constant is simple; safe use of it is a compatibility decision.
Frequently Asked Questions
What is xlExcel8 in VBA?
It is a member of Excel’s XlFileFormat enumeration used with methods such as Workbook.SaveAs. Microsoft assigns it value 56 and maps it to the Excel 97-2003 Workbook format with the .xls extension.
Is the Excel 97-2003 file-format constant the same as 56?
Yes. In Excel VBA, the named BIFF8 constant and FileFormat:=56 refer to the same format value. The named form is clearer inside Excel VBA, while 56 is often used in late-bound automation where Excel constants are unavailable.
Does value 56 save macros?
The .xls BIFF8 format can preserve VBA macros. However, Microsoft’s modern macro-enabled XML format is .xlsm, represented by xlOpenXMLWorkbookMacroEnabled. Use .xls when legacy compatibility is specifically required.
Why does Excel warn me when saving to Excel 97-2003 format?
Excel may detect formulas, data ranges, formatting, connections, or other features that cannot be represented fully in the older format. Compatibility warnings describe a format limitation, not necessarily a problem with the SaveAs syntax.
What is the row limit for an .xls file?
Excel 97-2003 worksheets are limited to 65,536 rows and 256 columns. Modern Excel worksheets support 1,048,576 rows and 16,384 columns, so content outside the old grid cannot be preserved in BIFF8.
Should I save as .xls or .xlsx?
Use .xls only when a legacy recipient or system requires it. Use .xlsx for a modern workbook without VBA, .xlsm when VBA code must be preserved, or .xlsb when a modern binary workbook is appropriate.
Can I use value 56 from Access VBA or VBScript?
Yes. If the Excel object library is not referenced, the symbolic Excel constant may be undefined. In late-bound code, define a local constant equal to 56 or pass 56 as the FileFormat argument.
Methodology
This article was researched against Microsoft’s current XlFileFormat enumeration, Workbook.SaveAs documentation, supported Excel file-format documentation, worksheet compatibility guidance, and Excel specifications. Enumeration values and SaveAs behavior were treated as primary-source facts. Practitioner explanations from Hans Passant and Siddharth Rout on Stack Overflow were used only to clarify the historical naming and a common extension/format mistake.
We also reviewed current search results for the keyword and related queries. The dominant results were short Q&A pages, forum troubleshooting threads, or enumeration references. Their recurring gaps were limited treatment of BIFF8 constraints, modern macro-format alternatives, late binding, compatibility validation, and the architectural difference between downgrading a source workbook and generating a legacy export.
No benchmark was performed on a specific workbook, and actual compatibility warnings depend on workbook contents and the installed Excel build. The code examples are documentation-aligned patterns, not a guarantee that every modern Excel feature will survive conversion to .xls.
This article was drafted with AI assistance and reviewed by the Perplexity AI Editorial Team. All data, citations, and claims have been independently verified against primary sources.
References
- Microsoft. (2021a). XlFileFormat enumeration (Excel). Microsoft Learn.
- Microsoft. (2021b). Workbook.SaveAs method (Excel). Microsoft Learn.
- Microsoft. (n.d.-a). Worksheet compatibility issues. Microsoft Support.
- Microsoft. (n.d.-b). File formats that are supported in Excel. Microsoft Support.
- Microsoft. (n.d.-c). File formats supported in Excel for Mac. Microsoft Support.
- Microsoft. (n.d.-d). Excel specifications and limits. Microsoft Support.
- Passant, H. (2012). What is the correct XlFileFormat enumeration for Excel 97-2003? Stack Overflow.
- Rout, S. (2013). Issue with saving active sheet to new workbook. Stack Overflow.