Need help on continuous updated Excel to WebMap

5080
8
Jump to solution
04-04-2016 03:05 AM
BaffourAwuah
New Contributor III

Could someone help me to either write a script or simpe Method to add an Excel file that could be updated to reflect on a dynamic Webmap or AGO map?

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
JakeSkinner
Esri Esteemed Contributor

Once you have the excel table joined to the feature class, publish this to ArcGIS Server.  You can then use this in your web map.  As the excel table is updated, the changes will automatically be reflected in the web map by setting up a Refresh Interval.

View solution in original post

8 Replies
BaffourAwuah
New Contributor III

It should be noted here that the Excel data is what was converted to Table and then joined to the Feature class.

0 Kudos
JakeSkinner
Esri Esteemed Contributor

Hi Baffour,

For the service, are you using ArcGIS Server, or an ArcGIS Online Hosted Feature Service?

0 Kudos
KellyGerrow
Esri Frequent Contributor

Hi Baffour,

If your data is already a feature class, then you may want to look into publishing/overwriting workflows with ArcPy. Let me know if this is the case and I can point you to other resources.

If you are looking to specifically publish from a csv (convert the excel spreadsheet to a csv), here is a sample of how to perform the initial upload and publishing of a csv file to a hosted feature service: developer-support/upload-publish-CSV-multipart-arcgisonline.py at master · Esri/developer-support · ...

You will need to modify this script in order to bake in an overwrite procedure. CSVs which are uploaded to ArcGIS Online and used to create a hosted feature service have the ability to overwrite the data into the existing feature service which will be reflected in the web map. Read this documentation for more about the overwrite functionality.

To script this, use the following rest api documentation, specifically the overwrite parameter and the update item and publish item call to add this functionality. You will need to update the already publiished hosted feaure service and then submit a publish call for the same item: Update Item​, Publish Item.

I would also recommend using the status call to check for progress.

-Kelly

BaffourAwuah
New Contributor III

Hi Kelly and Jake, thanks a lot. Actually I am using both ArcGIS Server and ArcGIS online. Yes, the data is already a Feature Class. The stand-alone Excel data connected to the Feature class will be updated by staff members (with access to the Excel data) outside the GIS section of the department. I need a method or script that runs for the update to be reflected on the Webmap.

0 Kudos
JakeSkinner
Esri Esteemed Contributor

Once you have the excel table joined to the feature class, publish this to ArcGIS Server.  You can then use this in your web map.  As the excel table is updated, the changes will automatically be reflected in the web map by setting up a Refresh Interval.

BaffourAwuah
New Contributor III

Jake, the excel table that is joined to the feature class is an ArcGIS converted  table but the same table to be updated is in the form of a standalone excel.

0 Kudos
JakeSkinner
Esri Esteemed Contributor

You will just need to export the Excel table to a supported format that can be published to ArcGIS Server.  For example, you could set up a model to export the excel table to a file geodatabase.  This table will be joined to the feature class, and then published to ArcGIS Server.  When publishing to ArcGIS Server, you will want to disable schema locking on the service:

http://server.arcgis.com/en/server/latest/administer/windows/disabling-schema-locking-on-a-map-servi...

That way you don't have to stop the service when the file geodatabase table is overwritten.

Optionally, you can export the model to a python script, and then schedule the script to run at a given interval.

BaffourAwuah
New Contributor III

Thanks a lot Jake! It worked very well. The only errors that pop-up were; 1. layer draw time may be affected by slow join access time; 2. Layer class has an SQL querry that is not optimised; 3. layer draw at all scale range.

Oh, thanks to Kelly too.

0 Kudos