I am trying to write a script that will automate exporting the attribute data in the survey 123 hosted feature layer from AGOL to an excel file. As I understand it I need to do this from within the ArcGIS Pro environment as I want the columns to be named with the name value from the survey 123 connect XLS form as opposed to the label. I would also like this script to be able to be run on a schedule as it is written without needing to update information before every run. Every time a new record is collected however the name of the .gdb file that is extracted from the zipfile changes and new records are not captured in the excel table. Additionally, the script still requires me to manually delete the excel/csv file each time to rerun the script... It won't overwrite despite the overwriteoutput = True statement. Is there a better workflow to download attribute data to an excel file with Python from within the ArcGIS Pro environment? Any help appreciated, Thanks
