PROBLEM

The attribute table of a CSV file added as XY Data in ArcMap appears empty

Last Published: April 25, 2020

Description

When adding a CSV file as XY data to ArcMap, the attribute table on the event layer shows no data. However, the attributes of the features are visible when viewed using the Identify tool.



The CSV table in the Table Of Contents also shows the features' attributes.


 

Cause

In ArcMap, the field names of a table or feature class must adhere to certain conventions for them to be valid. The guidelines for field names can be found here: ArcMap: Field naming guidelines. When the column headers of the CSV data added as layers to ArcMap contain whitespace characters, for example, LF, at the end of field names, the attribute table appears empty when viewed on the event layer in ArcMap.

 

Solution or Workaround

Perform the following steps to circumvent this issue.

Note:
Use Notepad++ to display whitespace characters, and edit the CSV data.
  1. Edit the CSV data.
    • Right click the CSV file.
    • Click Edit with Notepad++.
    • In the Notepad++ tab, click View > Show Symbol > Show All Characters.
    • Delete the whitespace characters at the end of the field names in the column headers. The following examples display the CSV data with and without the whitespace characters, LF, in the text editor.
       
      The image shows a CSV data edited with Notepad++. It shows LF at the end of two field attributes of the CSV data.
       
      An image with the whitespace character, LF, removed in Notepad++.
       
  2. Add the edited CSV data as a layer to ArcMap.

Article ID:000019261

Software:
  • ArcGIS Desktop 1

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic