Table To dBASE (Conversion)

Summary

Converts one or more tables to dBASE tables.

Usage

  • The tool copies the rows of a table, table view, feature class, feature layer, delimited file, or raster with an attribute table to a new geodatabase table.

  • This tool supports the following table formats as input:

    • Geodatabase
    • dBASE (.dbf)
    • Microsoft Excel worksheets (.xls and .xlsx)
    • Memory-based tables
    • Delimited files
      • Comma-delimited files (.csv, .txt, and .asc)
      • Tab-delimited files (.tsv and .tab)
      • Pipe-delimited files (.psv)

    For delimited files, the first row of the input file is used as the field names on the output table. Field names cannot contain spaces or special characters (such as $ or *), and an error will occur if the first row of the input file contains spaces or special characters.

  • The name of the output dBASE tables will be based on the name of the input table. To control the output name and for additional conversion options, use the Table To Table tool.

  • The Copy Rows and Table To Table tools can also be used to convert a table to a dBASE table.

  • If the name of an output table already exists in the output folder, and the Allow geoprocessing tools to overwrite existing datasets option is unchecked, a number will be appended to the end of the name to make it unique (for example, OutputTbl_1.dbf). If any of the input tables have the same name, a number will also be appended to the output table names, regardless of the overwrite existing datasets option. Otherwise, the table will be overwritten.

Parameters

LabelExplanationData Type
Input Tables

The list of tables to be converted to dBASE tables.

Table View
Output Folder

The destination folder where the output dBASE tables will be placed.

Folder

Derived Output

LabelExplanationData Type
Updated Output Folder

The folder containing the new dBASE tables.

Folder

arcpy.conversion.TableToDBASE(Input_Table, Output_Folder)
NameExplanationData Type
Input_Table
[table,...]

The list of tables to be converted to dBASE tables.

Table View
Output_Folder

The destination folder where the output dBASE tables will be placed.

Folder

Derived Output

NameExplanationData Type
Derived_Folder

The folder containing the new dBASE tables.

Folder

Code sample

TableToDBASE example 1 (Python window)

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

import arcpy
arcpy.env.workspace = "C:/data/Habitat_Analysis.gdb"
arcpy.conversion.TableToDBASE(["vegtype", "futrds"], "C:/output")
TableToDBASE example 2 (stand-alone script)

The following stand-alone script demonstrates how to use the TableToDBASE function.

# Name: TableToDBASE_Example2.py
# Description: Use TableToDBASE to copy tables to dBASE format
 
# Import system modules
import arcpy
 
# Set environment settings
arcpy.env.workspace = "C:/data"
 
# Set local variables
inTables = ["vegtype", "futrds"]
outLocation = "C:/output"

# Execute TableToDBASE
arcpy.conversion.TableToDBASE(inTables, outLocation)

Licensing information

  • Basic: Yes
  • Standard: Yes
  • Advanced: Yes

Related topics