Skip To Content

Table To Excel


Converts a table to a Microsoft Excel file.


  • Table To Excel converts only to Microsoft Excel 5.0/95 Workbook (.xls) format.

  • The input cannot exceed the 65535 rows limit of the .xls file format.


TableToExcel_conversion (Input_Table, Output_Excel_File, {Use_field_alias_as_column_header}, {Use_domain_and_subtype_description})
ParameterExplanationData Type

The table to be converted to Microsoft Excel format.

Table View

The output Microsoft Excel file.


How column names in the output are determined.

  • NAMEColumn headers will be set using the input's field names. This is the default.
  • ALIASColumn headers will be set using the input geodatabase table's field aliases. If the input is a layer in a map, the value set on the layer's field alias is ignored.

Controls how values from subtype fields or fields with a coded value domain are transferred to the output.

  • CODEAll field values will be used as they are stored in the table. This is the default.
  • DESCRIPTIONFor subtype fields, the subtype description will be used. For fields with a coded value domain, the coded value descriptions will be used.

Code sample

TableToExcel example (Python window)

The following Python window script demonstrates how to use the TableToExcel function in immediate mode.

import arcpy
arcpy.env.workspace = "c:/data"
arcpy.TableToExcel_conversion("gdb.gdb/addresses", "addresses.xls")
TableToExcel example 2 (stand-alone script)

Converts a table to a Microsoft Excel workbook.

# Name:

import arcpy

# Set environment settings
arcpy.env.workspace = "c:/data"

# Set local variables
in_table = "gdb.gdb/addresses"
out_xls = "addresses.xls"

# Execute TableToExcel
arcpy.TableToExcel_conversion(in_table, out_xls)

Licensing information

  • ArcGIS Desktop Basic: Yes
  • ArcGIS Desktop Standard: Yes
  • ArcGIS Desktop Advanced: Yes

Related topics