ArcGIS for Desktop

  • Documentation
  • Tarification
  • Support

  • My Profile
  • Aide
  • Sign Out
ArcGIS for Desktop

ArcGIS Online

La plateforme cartographique de votre organisation

ArcGIS for Desktop

Un SIG professionnel complet

ArcGIS for Server

SIG dans votre entreprise

ArcGIS for Developers

Outils de création d'applications de localisation

ArcGIS Solutions

Modèles d'applications et de cartes gratuits pour votre secteur d'activité

ArcGIS Marketplace

Téléchargez des applications et des données pour votre organisation.

  • Documentation
  • Tarification
  • Support
Esri
  • Se connecter
user
  • Mon profil
  • Déconnexion

Help

  • Accueil
  • Commencer
  • Carte
  • Analyser
  • Gérer les données
  • Outils
  • Plus...

Convert Table To CSV File

  • Résumé
  • Utilisation
  • Syntaxe
  • Exemple de code
  • Environnements
  • Informations de licence

Résumé

Converts a table to a CSV file.

Utilisation

  • The input file can be a geodatabase table, feature class, shape file, .dbf file, or table view.

  • The output CSV file has the option to be pipe or comma delimited.

Syntaxe

ConvertTableToCsvFile_roads (in_table, out_csv_file, {in_delimiter})
ParamètreExplicationType de données
in_table

A geodatabase table, feature class, shapefile, .dbf file, or table view to convert.

Table View
out_csv_file

Location and file name of the output CSV file.

file
in_delimiter
[in_delimiter,...]
(Facultatif)

Sets the delimiter for the output CSV file (optional). The pipe delimiter is the default choice.

  • PIPE —The fields are separated by a pipe, for example, Field1 | Field2. This is the default.
  • COMMA —The fields are separated by a comma, for example, Field1, Field2.
String

Exemple de code

ConvertTableToCsvFile example (in-line)

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

# tool variables
in_table="SpeedLimit"
out_csv_file="SpeedLimit_Converted"
in_delimiter="COMMA"

# set current workspace
arcpy.env.workspace="C:/Transportation.gdb"

# Process: Convert Table To CSV File
arcpy.ConvertTableToCsvFile_roads("SpeedLimit", "SpeedLimit_Converted", "COMMA")
ConvertTableToCsvFile example (Stand Alone script)

The following Python window script demonstrates how to use the ConvertTabletoCSV function in a stand-alone python script.

# Name: TableToCSV.py
# Description: Converts a table to a CSV file. 
# Requires: Esri Roads and Highways Solution

# Import arcpy module
import arcpy

# Check out any necessary licenses
arcpy.CheckOutExtension("Highways")

# Process: Convert Table To CSV File
arcpy.ConvertTableToCsvFile_roads(r"C:\Transportation.gdb\SpeedLimit", r"C:\Data\SpeedLimit_Coverted", "COMMA")

Environnements

  • Espace de travail courant

Informations de licence

  • ArcGIS for Desktop Basic: Requiert Roads and Highways
  • ArcGIS for Desktop Standard: Requiert Roads and Highways
  • ArcGIS for Desktop Advanced: Requiert Roads and Highways

Rubriques connexes

  • An overview of the Roads and Highways toolbox

ArcGIS for Desktop

  • Accueil
  • Documentation
  • Tarification
  • Support

ArcGIS Platform

  • ArcGIS Online
  • ArcGIS for Desktop
  • ArcGIS for Server
  • ArcGIS for Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

A propos d'Esri

  • A propos de la société
  • Carrières
  • Blog des initiés
  • Conférence des utilisateurs
  • Sommet des développeurs
Esri
Donnez-nous votre avis.
© Copyright 2016 Environmental Systems Research Institute, Inc. | Confidentialité | Légal