<?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 Download Excel file as .zip file with Geoprocessing in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/download-excel-file-as-zip-file-with-geoprocessing/m-p/764571#M491</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have an ArcGIS REST Service that shows me more different Table, all tables are stored into Oracle Geodatabase Enterprise. I have written a python script that calls the REST service, extract data and create an Excel file. The Excel is added into a zip file.&lt;/P&gt;&lt;P&gt;The zip file is written into the folder of the script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a toolbox on ArcCatalog and I have set a parameter (GetParameterAsText as input) for the script.&lt;/P&gt;&lt;P&gt;When I run the script by ArcCatalog, works fine and the zip file is added into the folder.&lt;/P&gt;&lt;P&gt;After published on ArcGIS Server the script as Geoprocessing, I have noticed that the zip file is not written into folder arcgisjobs/gp/geoprocessing_name/scratch.&lt;/P&gt;&lt;P&gt;There is some sample to see how I can download specific .zip folder created by the script on the server?&lt;/P&gt;&lt;P&gt;The zip file contains all table data formatted into Excel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Mar 2019 16:48:53 GMT</pubDate>
    <dc:creator>DEVAPP</dc:creator>
    <dc:date>2019-03-19T16:48:53Z</dc:date>
    <item>
      <title>Download Excel file as .zip file with Geoprocessing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/download-excel-file-as-zip-file-with-geoprocessing/m-p/764571#M491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have an ArcGIS REST Service that shows me more different Table, all tables are stored into Oracle Geodatabase Enterprise. I have written a python script that calls the REST service, extract data and create an Excel file. The Excel is added into a zip file.&lt;/P&gt;&lt;P&gt;The zip file is written into the folder of the script.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a toolbox on ArcCatalog and I have set a parameter (GetParameterAsText as input) for the script.&lt;/P&gt;&lt;P&gt;When I run the script by ArcCatalog, works fine and the zip file is added into the folder.&lt;/P&gt;&lt;P&gt;After published on ArcGIS Server the script as Geoprocessing, I have noticed that the zip file is not written into folder arcgisjobs/gp/geoprocessing_name/scratch.&lt;/P&gt;&lt;P&gt;There is some sample to see how I can download specific .zip folder created by the script on the server?&lt;/P&gt;&lt;P&gt;The zip file contains all table data formatted into Excel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Best&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2019 16:48:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/download-excel-file-as-zip-file-with-geoprocessing/m-p/764571#M491</guid>
      <dc:creator>DEVAPP</dc:creator>
      <dc:date>2019-03-19T16:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Download Excel file as .zip file with Geoprocessing</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/download-excel-file-as-zip-file-with-geoprocessing/m-p/764572#M492</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try the following steps:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Output parameter first set it as derived in the script properties &amp;gt; parameters &amp;gt; parameter properties &amp;gt; type &amp;gt; derived.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, keep the direction &amp;gt; output&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in the script write:&lt;/P&gt;&lt;P&gt;arcpy.SetParameter(1,open(r"E:\IMAGERY\CSX\planet_order_321693\OutputGurminder\out.txt", "w"))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am saving text in my case, in your case you call the method to save the excel zip file instead of open(). Then you go ahead and publish as a geoprocessing service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Gurminder&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Apr 2019 09:52:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/download-excel-file-as-zip-file-with-geoprocessing/m-p/764572#M492</guid>
      <dc:creator>GurminderBharani1</dc:creator>
      <dc:date>2019-04-01T09:52:52Z</dc:date>
    </item>
  </channel>
</rss>

