Import CSV Data

Feature Description

CSV (Comma Separated Values) is a text-based data file format (typically using commas as delimiters), frequently used for data exchange between different applications.

You can use Excel tools to convert attribute data formats like *.xlsx, *.xls, *.xml into *.csv format, thereby enabling the import of attribute table data and other data in tabular form into .

The system also supports importing attribute data in txt(*.txt) format that complies with CSV specifications, allowing direct import without additional data conversion.

Key considerations for file formatting:

  • No leading empty lines allowed. Data must be organized line by line with each record as a single row.
  • Text content should only contain delimiters and field values.
  • Uses English comma as default delimiter. also supports custom text delimiters.
  • The first row can serve as field names.

As shown below, the target *.csv file uses English commas (",") as delimiters with the first row containing selected fields. It includes four attribute columns representing: X coordinate values, Y coordinate values, type codes, and colors.

Feature Entry

  • Start Tab->Data Processing->Data Import->Vector Group->Spreadsheet.
  • Workspace Manager->Datasource Context Menu->Import Dataset....
  • Toolbox->Data Import->Spreadsheet->Import CSV.

Steps

  1. In the Data Import dialog, add the target *.csv file. For addition methods, refer to Import Data.
  2. For result data and source file information, see Common Parameter Description.
  3. Transformation Parameters
    • Separator: Specifies the delimiter in CSV files. Default is English comma (,). Additional options include period (.), tab, and space. The system also supports user-definable recognizable characters (including Chinese characters).
    • 1st Row as Header: Determines whether to treat the first CSV row as field names. When checked, imported fields will use first-row values; otherwise, default attributes will be generated. The application automatically detects specified fields if present in the first row.
    • Auto Length: Enables automatic field length adjustment. When enabled, the system uses the longest column entry plus 10 characters as the field length. May impact import speed with large datasets.
    • Data Preview: Displays preview of CSV data as attribute table.
  4. Import Spatial Data: When checked, imports data as point dataset; otherwise imports as tabular dataset.
    • WKT Field: Specifies geometry through WKT fields. For WKT format details, see WKT Text Markup Language.
    • Coordinate Fields: Specifies geometry through longitude, latitude, and elevation fields in CSV data.
  5. Click Import to execute the operation. Imported point dataset or tabular data example:

Notes:
  • When editing CSV files in text editors like Notepad, escape special half-width characters (commas, line breaks, or quotes) using half-width double quotes. For fields containing half-width quotes ("), replace with two double quotes ("") and enclose the string in quotes. Example: "Venture""Extended Edition""" imports as Venture"Extended Edition; """Supermap""" imports as "Supermap".
  • When using Microsoft Excel, special characters are automatically escaped during CSV saving. No manual escaping required.

Related Topics

Import Data

Import Shape Data

Import CAD Data

Import Excel Data

Supported Data Import/Export Formats