<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Using Python to Download Survey123 Survey in Excel in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724558#M59281</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jeremy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for responding so quickly!&lt;/P&gt;&lt;P&gt;I'm working on getting this block of code to work. However, my IDE is struggling with "farmParcelLayer" being an unresolved reference. Do you know how I would go about resolving that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Jan 2020 21:07:32 GMT</pubDate>
    <dc:creator>DrewThompson</dc:creator>
    <dc:date>2020-01-30T21:07:32Z</dc:date>
    <item>
      <title>Using Python to Download Survey123 Survey in Excel</title>
      <link>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724556#M59279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We are&amp;nbsp;currently creating survey templates using xlsx forms, submitting data in the field using Survey123 Connect, navigating to the Survey123 web platform to export the results to Excel, then modifying the Excel spreadsheet to fit the format we need. We are also using a python code to download the photos into one folder and another software to relabel the photos.&lt;/P&gt;&lt;P&gt;I would like to simplify this process.&lt;/P&gt;&lt;P&gt;I know that to relabel the photos I need the arcpy module from ArcGIS Pro so I'm in the process of getting that approved by my boss. So that takes care of the photo labeling work.&lt;/P&gt;&lt;P&gt;However, I would like to write some code to download the survey data in an excel document and automatically modify the columns and cells.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it's possible, how would I go about doing that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2020 18:41:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724556#M59279</guid>
      <dc:creator>DrewThompson</dc:creator>
      <dc:date>2020-01-30T18:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using Python to Download Survey123 Survey in Excel</title>
      <link>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724557#M59280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Python 3x, arcpy and all of its necessary modules should have already been installed on the machine when you installed ArcGIS Pro. You can check this by launching ArcGIS Pro, go to settings then to python and you can see the installed packages and also the path to the python environment.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To download an item from ArcGIS Online you will need to use the ArcGIS API for python. Essentially all you do is create a GIS connection (To ArcGIS Online):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?highlight=export#gis" title="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?highlight=export#gis" rel="nofollow noopener noreferrer" target="_blank"&gt;arcgis.gis module — arcgis 1.7.0 documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then&amp;nbsp; you will get the service item by using content.get and the item ID:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?highlight=content%20get#arcgis.gis.ContentManager.get" title="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?highlight=content%20get#arcgis.gis.ContentManager.get" rel="nofollow noopener noreferrer" target="_blank"&gt;arcgis.gis module — arcgis 1.7.0 documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you will export the item to an excel compatible format like CSV or xls by using .export:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?highlight=export#arcgis.gis.Item.export" title="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?highlight=export#arcgis.gis.Item.export" rel="nofollow noopener noreferrer" target="_blank"&gt;arcgis.gis module — arcgis 1.7.0 documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next you will download the exported item:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?highlight=download#arcgis.gis.Item.download" title="https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html?highlight=download#arcgis.gis.Item.download" rel="nofollow noopener noreferrer" target="_blank"&gt;arcgis.gis module — arcgis 1.7.0 documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can use XlsXWriter or CSV module to edit and change things around to how you want it.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is an example on how to export from ArcGIS Online. I didn't add in any code for the editing of the excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcgis

&lt;SPAN class="comment token"&gt;########################################################################################################################&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Variables&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;########################################################################################################################&lt;/SPAN&gt;

agoLogin &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;url&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"URL to your ArcGIS Portal use none if to ArcGIS Online"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                      username&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Your User Name"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                      password&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Your Password"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

itemToDownload &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; agolLogin&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"The Item ID"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
exportLoc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"The path where you want the file to download to"&lt;/SPAN&gt;
itemExportName &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"The Name of the Exported Item"&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;########################################################################################################################&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Export the ArcGIS Online Item&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;########################################################################################################################&lt;/SPAN&gt;

farmParcelLayer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;export&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;title&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Title / Name of the export. This will show up in ArcGIS Online"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                       export_format&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Excel"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                       parameters&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                       wait&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;########################################################################################################################&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Search for and get the Newly Exported Item&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;########################################################################################################################&lt;/SPAN&gt;

searchForExportedItem &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; agolLogin&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;search&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;query&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;itemExportName&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
exportedItemID &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; searchForExportedItem&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;id
getTheExportedItem &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; agolLogin&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;exportedItemID&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;########################################################################################################################&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Download the Newly Exported Item&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;########################################################################################################################&lt;/SPAN&gt;

getTheExportedItem&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;download&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;save_path&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;exportLoc&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:59:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724557#M59280</guid>
      <dc:creator>deleted-user-NvcfpBOWaKwr</dc:creator>
      <dc:date>2021-12-12T06:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using Python to Download Survey123 Survey in Excel</title>
      <link>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724558#M59281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jeremy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for responding so quickly!&lt;/P&gt;&lt;P&gt;I'm working on getting this block of code to work. However, my IDE is struggling with "farmParcelLayer" being an unresolved reference. Do you know how I would go about resolving that?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Jan 2020 21:07:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724558#M59281</guid>
      <dc:creator>DrewThompson</dc:creator>
      <dc:date>2020-01-30T21:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Using Python to Download Survey123 Survey in Excel</title>
      <link>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724559#M59282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm sorry I thought I renamed all of the variables. it should be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;itemToDownload&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;export&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;title&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Title / Name of the export. This will show up in ArcGIS Online"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                       export_format&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Excel"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                       parameters&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                       wait&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:59:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724559#M59282</guid>
      <dc:creator>deleted-user-NvcfpBOWaKwr</dc:creator>
      <dc:date>2021-12-12T06:59:06Z</dc:date>
    </item>
    <item>
      <title>Re: Using Python to Download Survey123 Survey in Excel</title>
      <link>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724560#M59283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jeremy,&lt;/P&gt;&lt;P&gt;Thank you for all your help so far.&lt;/P&gt;&lt;P&gt;I'm still having trouble with this code, though. It seems to be having an issue exporting the file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the summed up error that I'm getting:&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;"Unable to export item.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;Item type'file' is not supported for export, The item needs to be of type url"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #ff0000;"&gt;Item '[Item ID]' is of invalid type 'Form' Item type for export needs to be 'Feature Service', 'Vector Tile Service' or 'Scene Service'&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;(Error Code: 400)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cut and pasted your code above and filled in my own answers. I've also attempted to use different versions of the Item ID for this survey (using the entire URL, using the form_title, random attempts with different identifiers, etc). I've also gone through and double-checked that everything is spelled correctly and I'm not experiencing any syntax errors either.&lt;/P&gt;&lt;P&gt;Also, when I simply go through the motions of downloading the file, it downloads as an empty text file (the survey has over 100 lines of data so it shouldn't be empty).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas how I&amp;nbsp;can&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;go about fixing this?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2020 16:41:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724560#M59283</guid>
      <dc:creator>DrewThompson</dc:creator>
      <dc:date>2020-01-31T16:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using Python to Download Survey123 Survey in Excel</title>
      <link>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724561#M59284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So it looks like you are inputting the Item ID for the actual survey form.&amp;nbsp;When you create and publish a survey to ArcGIS Online it will create a folder for your survey. Within that folder you will see a "Form" and a "Feature Layer" that should have the exact same name. You want to use the Item ID for the feature layer.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You probably already know how to find the feature layer's Item ID but just in case, Go to ArcGIS Online and login. Then go to "Content" then on the left hand side under "Folders" double click on the Folder for the survey you would like to export the Excel File from. Within that folder you should see a "Form" and "Feature Layer" that have matching names. Click on the feature layer to open its "Overview" page. The Item ID will be located at the end of the URL in your web browser. Here is an example of the full url:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="unlinked"&gt;https://yourpage.arcgis.com/home/item.html?id=642f9c5b85e64788a6b2b5418dd61320&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You want all of the numbers and letters after the equals sign and your Item ID should look something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A style="color: #606060;"&gt;642f9c5b85e64788a6b2b5418dd61320&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope This Helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2020 17:23:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724561#M59284</guid>
      <dc:creator>deleted-user-NvcfpBOWaKwr</dc:creator>
      <dc:date>2020-01-31T17:23:03Z</dc:date>
    </item>
    <item>
      <title>Re: Using Python to Download Survey123 Survey in Excel</title>
      <link>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724562#M59285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, Jeremy.&lt;/P&gt;&lt;P&gt;That fix definitely allowed the code to run.&lt;/P&gt;&lt;P&gt;I'm getting a zip file that downloads now with a webform instead of an excel. I think that since I have to navigate to the online forum every time anyways, I might as well continue clicking the "export" button instead of dealing with all the code.&lt;/P&gt;&lt;P&gt;Again, thank you for walking me through these steps.&lt;/P&gt;&lt;P&gt;Have a great week!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2020 17:41:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724562#M59285</guid>
      <dc:creator>DrewThompson</dc:creator>
      <dc:date>2020-01-31T17:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using Python to Download Survey123 Survey in Excel</title>
      <link>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724563#M59286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So I figured out the issue. I had a bonehead moment. I try to test every script I give to people to make sure it works. So after pulling the needed code out of one of my other scripts and editing it to give to you. I forgot to save the completed version that worked and ended up copying over the non-working version. I just retested it and fixed the issue. My apologies about that. If you want to revisit the code again below is the working version.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcgis

&lt;SPAN class="comment token"&gt;########################################################################################################################&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Variables&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;########################################################################################################################&lt;/SPAN&gt;

agoLogin &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;url&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                      username&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Your ArcGIS Online Login Name"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                      password&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Your Paassword"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

itemToDownload &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; agoLogin&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Add the Item ID of the feature layer for the survey"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
exportLoc &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"Path to the folder where you want to save the excel file"&lt;/SPAN&gt;
itemExportName &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Name of the excel file. Make it unique"&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;########################################################################################################################&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Export the ArcGIS Online Item&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;########################################################################################################################&lt;/SPAN&gt;

itemToDownload&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;export&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;title&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;itemExportName&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                      export_format&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Excel"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                      parameters&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;None&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                      wait&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;########################################################################################################################&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Search for and get the Newly Exported Item&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;########################################################################################################################&lt;/SPAN&gt;

searchForExportedItem &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; agoLogin&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;search&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;query&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;itemExportName&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
exportedItemID &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; searchForExportedItem&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;id
getTheExportedItem &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; agoLogin&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;exportedItemID&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;########################################################################################################################&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Download the Newly Exported Item&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;########################################################################################################################&lt;/SPAN&gt;

getTheExportedItem&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;download&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;save_path&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;exportLoc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                            file_name&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"{}.xlsx"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;itemExportName&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:59:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724563#M59286</guid>
      <dc:creator>deleted-user-NvcfpBOWaKwr</dc:creator>
      <dc:date>2021-12-12T06:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using Python to Download Survey123 Survey in Excel</title>
      <link>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724564#M59287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That worked!!&lt;/P&gt;&lt;P&gt;Jeremy- thank you so much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jan 2020 19:29:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724564#M59287</guid>
      <dc:creator>DrewThompson</dc:creator>
      <dc:date>2020-01-31T19:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Using Python to Download Survey123 Survey in Excel</title>
      <link>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724565#M59288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way to clean up the excel sheets saved on AGOL?&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2020 13:06:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-python-to-download-survey123-survey-in-excel/m-p/724565#M59288</guid>
      <dc:creator>JordanMiller4</dc:creator>
      <dc:date>2020-10-05T13:06:30Z</dc:date>
    </item>
  </channel>
</rss>

