<?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: GeoProcessing tool returning Table to Excel error: &amp;lt;empty&amp;gt; in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393849#M15296</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you want to move this to &lt;A href="https://community.esri.com/community/gis/enterprise-gis/arcgis-for-server?sr=search&amp;amp;searchId=f1521c54-217b-4b2f-be2a-6b0aa9bb6fe8&amp;amp;searchIndex=0"&gt;https://community.esri.com/community/gis/enterprise-gis/arcgis-for-server?sr=search&amp;amp;searchId=f1521c54-217b-4b2f-be2a-6b0aa9bb6fe8&amp;amp;searchIndex=0&lt;/A&gt;‌ Justin?&amp;nbsp; When you enter the server realm, you have a whole different set of issues to content with.&amp;nbsp; Or use the Share option at least.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Sep 2016 17:25:59 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2016-09-23T17:25:59Z</dc:date>
    <item>
      <title>GeoProcessing tool returning Table to Excel error: &lt;empty&gt;</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393848#M15295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a GeoProcessing tool that develops a Census profile based on a user defined study area - the final output using Table to Excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The model operates perfectly in ArcGIS and produces the output that i require. It also publishes to Server without any errors or warnings. However, when I run the tool on ArcGIS Server I get an error saying that the .xls is &amp;lt;empty&amp;gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas what could be happening here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Image below of model and then error when I run the model&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="232944" alt="" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/232944_Model_ERROR.jpg" style="width: 620px; height: 206px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Justin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2016 16:28:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393848#M15295</guid>
      <dc:creator>JustinGleeson1</dc:creator>
      <dc:date>2016-09-23T16:28:14Z</dc:date>
    </item>
    <item>
      <title>Re: GeoProcessing tool returning Table to Excel error: &lt;empty&gt;</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393849#M15296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you want to move this to &lt;A href="https://community.esri.com/community/gis/enterprise-gis/arcgis-for-server?sr=search&amp;amp;searchId=f1521c54-217b-4b2f-be2a-6b0aa9bb6fe8&amp;amp;searchIndex=0"&gt;https://community.esri.com/community/gis/enterprise-gis/arcgis-for-server?sr=search&amp;amp;searchId=f1521c54-217b-4b2f-be2a-6b0aa9bb6fe8&amp;amp;searchIndex=0&lt;/A&gt;‌ Justin?&amp;nbsp; When you enter the server realm, you have a whole different set of issues to content with.&amp;nbsp; Or use the Share option at least.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2016 17:25:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393849#M15296</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-09-23T17:25:59Z</dc:date>
    </item>
    <item>
      <title>Re: GeoProcessing tool returning Table to Excel error: &lt;empty&gt;</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393850#M15297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you want the user running the GP service to be able to download the .xls file? &amp;nbsp;What is the output parameter file type? &amp;nbsp;Can you try to set it to File if it isn't and republish the service? &amp;nbsp;Can you also provide a screenshot of the error, or the final JSON response when monitoring the job status using Fiddler or the Dev tools?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2016 22:26:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393850#M15297</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2016-09-23T22:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: GeoProcessing tool returning Table to Excel error: &lt;empty&gt;</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393851#M15298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;Yes, I want to be able to download an Excel file. This is set to 'file' so no problem there.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have had a look at the logs on Server Manager and it seems that the problem may be with the parameter that I am taking from the DataPrep python script tool. The final table that I need to link to Table to Excel (essentially GeoProfile, the output parameter from the DataPrep script) seems to be inaccessible when I run on Server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the error log that I get on Server Manager:&lt;/P&gt;&lt;P&gt;Error executing tool. Model2 Job ID: j91533738840043b48bf730482226e32e : ERROR 000732: Input Table: Dataset c:\arcgisserver\directories\arcgisjobs\geoprocessing_dev\airogeoprofile_roi_gpserver\j91533738840043b48bf730482226e32e\scratch\scratch.gdb\GeoProfile does not exist or is not supported Failed to execute (Table To Excel). Failed to execute (Model2). Failed to execute (GeoProfile_RoI_2).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a snippet of the last code in the script tool. There are a number of different things happening here such as joining other tables, deleting fields etc. The final table, in the order that I need is then called GeoProfile. I then tried to set this as the output parameter in the script tool so I can connect it to the Table to Excel tool within the main model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;arcpy.JoinField_management("ThemesIndicators_1", "IndCode", "PopSummaryS", "Indicators", ["IndCode","Census2011"])&lt;BR /&gt; arcpy.JoinField_management("ThemesIndicators_1", "Indicator", "ThemesIndicators_Comps_1", "Indicator", "State;Carlow;DCC;SDCC;Fingal;DLR;Kildare;Kilkenny;Laois;Longford;Louth;Meath;Offaly;Westmeath;Wexford;Wicklow;Clare;Cork_ City;Cork_Co;Kerry;Limerick;Tipperary;Waterford;Galway_City;Galway_Co;Leitrim;Mayo;Roscommon;Sligo;Cavan;Donegal;Monaghan")&lt;BR /&gt; arcpy.DeleteField_management("ThemesIndicators_1", ["IndCode"])&lt;BR /&gt; arcpy.Copy_management("ThemesIndicators_1", "GeoProfile")&lt;BR /&gt; arcpy.SetParameterAsText(0, "GeoProfile")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;except:&amp;nbsp;&lt;/P&gt;&lt;P&gt;pass&lt;/P&gt;&lt;P&gt;"&lt;/P&gt;&lt;P&gt;You may notice something incorrect here&lt;/P&gt;&lt;P&gt;Thanks for your help&lt;/P&gt;&lt;P&gt;Justin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Sep 2016 07:54:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393851#M15298</guid>
      <dc:creator>JustinGleeson1</dc:creator>
      <dc:date>2016-09-24T07:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: GeoProcessing tool returning Table to Excel error: &lt;empty&gt;</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393852#M15299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So "Geoprofile" is the Excel table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;c:\arcgisserver\directories\arcgisjobs\geoprocessing_dev\airogeoprofile_roi_gpserver\j91533738840043b48bf730482226e32e\scratch\scratch.gdb\GeoProfile&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;It's trying to write a to the scratch geodatabase, which won't work. &amp;nbsp;I suggest you re-write the output location of the Excel file using the scratch folder:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;Eg.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;outTable = os.path.join(arcpy.env.scratchFolder,"GeoProfile.xls")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff;"&gt;That way, you ensure the Excel table will be written to a folder.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 24 Sep 2016 22:06:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393852#M15299</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2016-09-24T22:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: GeoProcessing tool returning Table to Excel error: &lt;empty&gt;</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393853#M15300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;No, not quite.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;GeoProfile is the final table that I want to export to an Excel file. GeoProfile is set as an output parameter in the script and I then connect GeoProfile to the Table to Excel tool in the main model. It seems that when operating on Server the Table to Excel tool is not finding 'GeoProfile' and then can't export the final Excel file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Justin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Sep 2016 15:45:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393853#M15300</guid>
      <dc:creator>JustinGleeson1</dc:creator>
      <dc:date>2016-09-25T15:45:09Z</dc:date>
    </item>
    <item>
      <title>Re: GeoProcessing tool returning Table to Excel error: &lt;empty&gt;</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393854#M15301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see, and where is GeoProfile going? &amp;nbsp;What scratch workspace are you using?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;SPAN style="background-color: #ffffff;"&gt;arcpy.Copy_management("ThemesIndicators_1", "GeoProfile")&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Do you have ArcMap on the Server machine, or can you reach the arcgisjobs directory using ArcMap ArcCatalog? &amp;nbsp;You can check in the scratch geodatabase to see what's actually being written there. &amp;nbsp;Making sure you use a "dynamic" scratch workspace for your outputs might be a good idea if you're not already so you know exactly where it's supposed to go. &amp;nbsp;For example, construct the path to any data you want use arcpy.env.scratchFolder and arcpy.env.scratchGDB, (see my above post). &amp;nbsp;There's also a chance that the published script, (the one in the arcgisinput file), has been modified during publishing time in a way that invalidates an output location. &amp;nbsp;This was particularly true in earlier version of ArcGIS Server.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 25 Sep 2016 22:44:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393854#M15301</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2016-09-25T22:44:14Z</dc:date>
    </item>
    <item>
      <title>Re: GeoProcessing tool returning Table to Excel error: &lt;empty&gt;</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393855#M15302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;HI Jonathan,&lt;/P&gt;&lt;P&gt;As it stands GeoProfile is being written to the main .gdb where all of the other data is. I set this at the start of the Python script tool:&lt;/P&gt;&lt;P&gt;env.workspace = r"C:\Projects\GeoProcessingTools\GeoProfile_RoICensus\GeoProfile_RoI.gdb"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've traced this down and it seems that the file that I require (GeoProfile) to be linked to the Table to Excel is not appearing the the Jobs Scratch directory at all when run on server. In fact, it seems that my python script tool is not actually editing and making permanent changes when it runs on server at all however it does this perfectly when run on my local machine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How would I set 'GeoProfile' to be set to a scratch gdb?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 15:27:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393855#M15302</guid>
      <dc:creator>JustinGleeson1</dc:creator>
      <dc:date>2016-09-26T15:27:56Z</dc:date>
    </item>
    <item>
      <title>Re: GeoProcessing tool returning Table to Excel error: &lt;empty&gt;</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393856#M15303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are two things you can do:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) &amp;nbsp;Set the scratch workspace environment variable to in_memory, and specifically set the path when it shouldn't go to "in_memory". &amp;nbsp;This can be done by adding the follwoing line to your script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.env.scratchWorkspace = "in_memory"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Whenever a GP tool runs, (and it's valid to write to in_memory), simply specify the name of the output and it'll write to the in_memory workspace. &amp;nbsp;In the situation where writing to in_memory is not appropriate, (for example creating an .xls file), construct the path to that output using arcpy.env.scratchFolder:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;Eg.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;outTable = os.path.join(arcpy.env.scratchFolder,"GeoProfile.xls")&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;2) Construct the path for every output using arcpy.env.scratchFolder or arcpy.env.scratchGDB:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;outGeoProfile = os.path.join(arcpy.env.scratchGDB,"GeoProfile")&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;By using arcpy.env.scratchGDB, arcpy.env.scratchFolder, and setting arcpy.env.scratchWorkspace to "in_memory", you ensure that regardless of the script running in ArcMap, or Server, you're writing to consistent locations specific to where you run it:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;arcpy.env.scratchGDB&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; - Desktop - C:\Users\&amp;lt;user&amp;gt;\Documents\ArcGIS\scratch.gdb&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; - Server - &amp;lt;jobs_directory&amp;gt;/&amp;lt;jobID&amp;gt;/scratch.gdb&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;arcpy.env.scratchFolder&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; - Desktop -&amp;nbsp;C:\Users\&amp;lt;user&amp;gt;\Documents\ArcGIS\scratch&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&amp;nbsp; - Server -&amp;nbsp;&lt;SPAN&gt;&amp;lt;jobs_directory&amp;gt;/&amp;lt;jobID&amp;gt;/scratch&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="background-color: #ffffff; border: 0px; font-weight: inherit;"&gt;&lt;SPAN&gt;"in_memory" can be treated the same as a file geodatabase.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 15:37:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393856#M15303</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2016-09-26T15:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: GeoProcessing tool returning Table to Excel error: &lt;empty&gt;</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393857#M15304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jonathan,&lt;/P&gt;&lt;P&gt;Thanks for your comments on this! I've tried your suggestions but can't seem to get this to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My script tool makes a series of adjustments to "ThemesIndicators_1" with the last bit being DeleteField. At this point my table is fully processed and ready to be exported to excel in the way that I want it (if possible). I guess what I want to do is save ThemesIndicators_1 as ThemesIndicators_2 and make this available as an output parameter in my main model so I can proceed with the Table to Excel function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is the last part of my script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;arcpy.DeleteField_management("ThemesIndicators_1", ["IndCode"])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;OutTable = os.path.join(arcpy.env.scratchGDB,"ThemesIndicators_2")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CopyFeatures_management(ThemesIndicators_1, OutTable)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SetParameterAsText(0, "ThemesIndicators_2")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After many different attempts I still can't get this to run on the server as ThemesIndicators_2 can't be found in the scratch gdb for it to work. Error here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;c:\arcgisserver\directories\arcgisjobs\geoprocessing_dev\airogeoprofile_roi_gpserver\j225cda15bd37482c85f1f67aaddb3270\scratch\scratch.gdb\ThemeIndicators_2 does not exist or is not supported Failed to execute (Table To Excel). Failed to execute (Model2). Failed to execute (GeoProfile_RoI_2).&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Sep 2016 21:20:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393857#M15304</guid>
      <dc:creator>JustinGleeson1</dc:creator>
      <dc:date>2016-09-27T21:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: GeoProcessing tool returning Table to Excel error: &lt;empty&gt;</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393858#M15305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hm, the first thing I would try is using SetParameter instead of SetParameterAsText, (you're not really returning text after all, you'll be returning a feature class). &amp;nbsp;Make sure the output parameter type is a feature class as well. &amp;nbsp;Then, try to update the arcpy.SetParameter() line to return the OutTable variable instead of the name of the output data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;arcpy.DeleteField_management("ThemesIndicators_1", ["IndCode"])&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;OutTable = os.path.join(arcpy.env.scratchGDB,"ThemesIndicators_2")&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;arcpy.CopyFeatures_management(ThemesIndicators_1, OutTable)&lt;/SPAN&gt;&lt;BR style="background-color: #ffffff;" /&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;arcpy.SetParameter(0, &lt;SPAN&gt;OutTable&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; border: 0px;"&gt;That way, you're making sure that the output of the script is pointing to the path to the data you're looking to return.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Sep 2016 01:39:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/geoprocessing-tool-returning-table-to-excel-error/m-p/393858#M15305</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2016-09-29T01:39:48Z</dc:date>
    </item>
  </channel>
</rss>

