Is There A Way To Limit Fields in Table to Excel Tool?

444
1
04-11-2019 11:19 AM
PatrickMcKinney1
Occasional Contributor III

I'm updating a custom ArcGIS Tool using ArcMap flavor ArcPy.  I have a function that exports any selected features (from a select by location analysis) to an Excel Spreadsheet (using Excel to Table).  

Is there a way to limit which fields get exported to Excel?  A better experience would be presented to the end users if they only had the fields of interest in the exported Excel files.

And the layers being exported are "Feature Layers," as there are spatial selections being applied to them.

0 Kudos
1 Reply
DanPatterson_Retired
MVP Emeritus

Hide the fields you don't want to be included.  Only visible fields get exported

Try setVisible

https://pro.arcgis.com/en/pro-app/arcpy/classes/fieldinfo.htm

Your code would help pinpoint any problems.