ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • ヘルプ
  • Sign Out
ArcGIS Desktop

ArcGIS Online

組織のマッピング プラットフォーム

ArcGIS Desktop

完全なプロ仕様の GIS

ArcGIS Enterprise

エンタープライズ GIS

ArcGIS Developers

位置情報利用アプリの開発ツール

ArcGIS Solutions

各種業界向けの無料のテンプレート マップおよびテンプレート アプリケーション

ArcGIS Marketplace

組織で使えるアプリとデータを取得

  • ドキュメント
  • サポート
Esri
  • サイン イン
user
  • マイ プロフィール
  • サイン アウト

ArcMap

  • ホーム
  • はじめに
  • マップ
  • 解析
  • データ管理
  • ツール
  • エクステンション

Convert Table To CSV File

  • 概要
  • 使用法
  • 構文
  • コードのサンプル
  • 環境
  • ライセンス情報

概要

Converts a table to a CSV file.

使用法

  • 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.

構文

arcpy.locref.ConvertTableToCsvFile(in_table, out_csv_file, {in_delimiter})
パラメーター説明データ タイプ
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,...]
(オプション)

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

コードのサンプル

ConvertTableToCsvFile example 1 (Python window)

The following Python window script demonstrates how to use the ConvertTableToCsvFile 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_locref(in_table, out_csv_file, in_delimiter)
ConvertTableToCsvFile example 2 (stand-alone script)

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

# Name: TableToCSV.py
# Description: Converts a table to a CSV file. 

# Import arcpy module
import arcpy

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

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

環境

  • 現在のワークスペース

ライセンス情報

  • Basic: 次のものが必要 Roads and Highways
  • Standard: 次のものが必要 Roads and Highways
  • Advanced: 次のものが必要 Roads and Highways

関連トピック

  • An overview of the Location Referencing toolbox

ArcGIS Desktop

  • ホーム
  • ドキュメント
  • サポート

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS Developers
  • ArcGIS Solutions
  • ArcGIS Marketplace

Esri について

  • 会社概要
  • 採用情報
  • Esri ブログ
  • ユーザ カンファレンス
  • デベロッパ サミット
Esri
ご意見・ご感想をお寄せください。
Copyright © 2021 Esri. | プライバシー | リーガル