Select to view content in your preferred language

Updating a feature class when there are changes to an Excel row

564
4
02-05-2026 06:40 AM
Dakshata_Parajuli
Emerging Contributor
We maintain an Excel sheet that is regularly updated, but some of my team members are not familiar with ArcGIS Pro to do data entry. Therefore, want to create a workflow that automatically pushes the information from Excel to an Enterprise GIS feature layer in real time. I’m new to integrating Excel with feature layers could someone provide guidance or best practices to accomplish this?
0 Kudos
4 Replies
RyanUthoff
MVP Regular Contributor

Someone might be able to provide a better solution, but I have a couple different ideas with the knowledge I have, but none of it will display changes in the Excel file in real time.

  1. Use Python to make the updates. There are various implementations of this, but you can use Python to identify the changes in the Excel file, and then have it update the SQL table.
  2. Do the same thing as what I said above, except do it in FME.

None of this will push the data up in real time, but you could schedule it every 15 minutes, hour, etc.

DavidSolari
MVP Regular Contributor

If you restructure the workbook around the ArcGIS for Excel extension you can have two-way updates between the GIS and the Workbook. Keep in mind the workbook authors will need a certain level of user privileges to push updates through the extension.

Robert_LeClair
Esri Esteemed Contributor

At first I was thinking you could use an immediate calculation Attribute Rule to accomplish this but Arcade cannot be used to directly access MS Excel files or monitor changes.  As @RyanUthoff mentioned, likely Python could do this.  I used an AI assistant on the Esri Support website to write this Python example below.  Likely you'll need to change and test the workflow to see if it works as intended. but it's a starting point.

import pandas as pd
import arcpy
import os
import time

# Paths
excel_file = r"C:\Temp\TEMP.xlsx" # Replace with your Excel file path
sde_connection = r"C:\Temp\GISOWNER@TEMP.sde" # Replace with your connection file
feature_class = "TEMP.YourFeatureClass" # Replace with your feature class name
field_to_update = "NAME" # Replace with the field name in your eGDB.

# Function to update the enterprise geodatabase
def update_geodatabase_from_excel():
       # Read Excel file
df = pd.read_excel(excel_file, sheet_name="TEMP")

# Assuming the Excel file has a column 'NAME' and a unique identifier 'ID'
name_dict = dict(zip(df['ID'], df['NAME']))

# Update the geodatabase
with arcpy.da.UpdateCursor(os.path.join(sde_connection, feature_class), ['ID', field_to_update]) as cursor:
for row in cursor:
if row[0] in name_dict:
row[1] = name_dict[row[0]]
cursor.updateRow(row)

# Monitor the Excel file for changes
last_modified_time = os.path.getmtime(excel_file)
while True:
current_modified_time = os.path.getmtime(excel_file)
if current_modified_time != last_modified_time:
update_geodatabase_from_excel()
last_modified_time = current_modified_time
time.sleep(5) # Check every 5 seconds

DuncanHornby
MVP Notable Contributor

An issue I have come across when an Excel sheet is directly loaded into an ArcPro map is the need to refresh the link to allow you to see the latest edits done in Excel. Imagine you have an XY event layer built from XY fields from an Excel sheet loaded in the map. You would need to run the Refresh Excel tool to see updates, the alternative is to shutdown and restart ArcPro which frankly is a non-starter.