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.
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.