You are here:
About working with Microsoft Excel files in ArcGIS
Data support in ArcGIS
Tables and attribute information
Creating tables and managing attribute information
You can open Microsoft Excel tables directly in ArcGIS and work with them like other tabular data sources. For example, you can add them to ArcMap, preview them in ArcCatalog, and use them as inputs to geoprocessing tools.
Excel files are added to ArcMap like other data, through the Add Data dialog box. When you browse to an Excel file, you will need to choose which table you want to open. For example, if you have an Excel workbook called sales_figures.xls that contains three worksheets—Sales, Month, and Year to date—each worksheet is a separate table in ArcGIS. Any name references to cells or ranges defined in Excel are preserved in ArcGIS.
When accessed from ArcGIS, a worksheet is shown as a table with a $ at the end of its name, but a named range does not have a $. Worksheets or named ranges with names containing spaces have single quotation marks placed around the table name.
Once added to ArcMap, you can open the table from the Source tab of the table of contents. However, you will not be able to edit the table or export records to an Excel format.
The following example contrasts how a multi-sheet document is exposed in Microsoft Excel and in the ArcMap Add Data dialog box.
- Three worksheets as they appear on the Sheet tab bar at the bottom of the Excel window:
- Available worksheets inside the sales_figures workbook on the ArcMap Add Data dialog box:
When working with Excel files, there are a few things to keep in mind:
- Excel tables are read only in ArcGIS, as well as read only in Excel when you have a workbook open in ArcGIS.
- Field names are derived from the first row in each column of the worksheet. You can view the properties, set aliases for the field names, and set field visibility on the Fields tab of the table's Properties dialog box.
- Microsoft Excel does not enforce field types for values during data entry like standard databases do. Therefore, the field type specified in Excel is not used in determining the field type exposed in ArcGIS. Instead, field type in ArcGIS is determined by a scan of the values in the first eight rows for that field. If the scan finds mixed data types in a single field, that field will be returned as a string field and the values will be converted to strings.
- Numeric fields are converted to the Double data type in ArcGIS.
- Excel tables behave like other tables that don't have an ObjectID field. This means you will be unable to edit, perform relates, or make selections on the map. (Note: ArcMap does not convert any column from Excel into an ArcGIS ObjectID field. For example, a numeric column named "OID" or an autonumber field will be a Double in ArcMap.)
- Excel file support in ArcGIS uses Microsoft OLE DB Provider for Jet 4.0 and its supporting Excel ISAM (Indexed Sequential Access Method) driver. For more information on the Microsoft OLE DB Provider for Jet 4.0 and its supporting Excel ISAM, see Microsoft KB article 326548.
- You cannot create new Excel files or export records to an Excel file in ArcGIS.
- You can still open an Excel file through an OLE DB database connection.
- You should not manually specify that ArcCatalog show you .xls files.
NOTE: If you have previously specified on the File Types tab of the Tools > Options dialog box that ArcCatalog show you .xls files, you'll need to remove this file type to be able to access Excel files directly.
How to work with Microsoft Excel files in ArcGIS
Formatting a table in Microsoft Excel for use in ArcGIS
- Make sure the first row of the worksheet is properly formatted, since it will be used for the field names in ArcGIS. You should follow these general best practices for field naming, particularly if you want to join an Excel table to another table in ArcMap:
If you have cells with numeric data, dates, and so on, make sure the content is consistently formatted—in other words, make sure all the numeric data is actually numeric. ArcMap will scan the first eight rows to determine the field type that should be used. If there are other types of data in those rows, the field will be converted to text when the table is in ArcMap.
- Field names must start with a letter.
- Field names must contain only letters, numbers, and underscores.
- Field names must not exceed 64 characters.
Numeric fields are converted to the Double data type in ArcGIS.
ArcMap can only read the first 255 characters of a cell. If you have more characters than that, ArcMap converts the field to a BLOB type and you won't be able to read its contents.
Adding a Microsoft Excel table to ArcMap
- Click the Add Data button .
- Click the Look in drop-down arrow and navigate to the Excel workbook file (.xls).
- Double-click the Excel workbook file.
- Click the table you want to add to ArcMap.
- Click Add.Excel tables, like other tables without associated features, only show up on the Source tab of the ArcMap table of contents.
- You can also drag and drop from ArcCatalog to add an Excel table to ArcMap.
Please visit the Feedback
page to comment or give suggestions on ArcGIS Desktop Help.
Copyright © Environmental Systems Research Institute, Inc.