<?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 accessing excel data when publishing python script tool as gp service in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/accessing-excel-data-when-publishing-python-script/m-p/154167#M5176</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have used the following testing python script it runs well on arcmap. than i used result window and published it as geoprocessing service. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;however when i run it from the ARCGIS server Manager&amp;nbsp; i received following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style: italic; font-family: Courier New;"&gt;Unable to complete operation.&lt;BR /&gt;Invalid return value: C:\arcgisserver\directories\arcgisjobs\may_exceltodbf_gpserver\jb572f53715e1473f86a7edb92a3525f8\scratch\cal.dbf&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggesstion.....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;following is my script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
import arcpy
from arcpy import env
## Change this to your workspace location
env.workspace = "C://WEXFORD//DATA"

## Change this to your spreadsheet and workbook name
inTable = "C://WEXFORD//DATA//calculator.xlsx/sheet1$"

outLocation = ""C://WEXFORD//DATA"
outTable = "cal"
arcpy.TableToTable_conversion(inTable,outLocation,outTable)
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 May 2013 16:17:51 GMT</pubDate>
    <dc:creator>NadeemQazi</dc:creator>
    <dc:date>2013-05-16T16:17:51Z</dc:date>
    <item>
      <title>accessing excel data when publishing python script tool as gp service</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/accessing-excel-data-when-publishing-python-script/m-p/154167#M5176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have used the following testing python script it runs well on arcmap. than i used result window and published it as geoprocessing service. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;however when i run it from the ARCGIS server Manager&amp;nbsp; i received following error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-style: italic; font-family: Courier New;"&gt;Unable to complete operation.&lt;BR /&gt;Invalid return value: C:\arcgisserver\directories\arcgisjobs\may_exceltodbf_gpserver\jb572f53715e1473f86a7edb92a3525f8\scratch\cal.dbf&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggesstion.....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;following is my script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;
import arcpy
from arcpy import env
## Change this to your workspace location
env.workspace = "C://WEXFORD//DATA"

## Change this to your spreadsheet and workbook name
inTable = "C://WEXFORD//DATA//calculator.xlsx/sheet1$"

outLocation = ""C://WEXFORD//DATA"
outTable = "cal"
arcpy.TableToTable_conversion(inTable,outLocation,outTable)
&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 16:17:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/accessing-excel-data-when-publishing-python-script/m-p/154167#M5176</guid>
      <dc:creator>NadeemQazi</dc:creator>
      <dc:date>2013-05-16T16:17:51Z</dc:date>
    </item>
    <item>
      <title>Re: python scripting for creating geoprocessing.</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/accessing-excel-data-when-publishing-python-script/m-p/154168#M5177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm not entirely sure about why you're getting that error, but can tell you that you can't use Excel tables with GP Services in 10.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can use excel as a FILE (there are Python modules which read excel FILES...)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But ArcGIS Server cannot use Excel TABLES (the sheet you reference in your code with $).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You'll have to replace the excel table, or access it with other Python modules as a file.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 17:12:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/accessing-excel-data-when-publishing-python-script/m-p/154168#M5177</guid>
      <dc:creator>KevinHibma</dc:creator>
      <dc:date>2013-05-16T17:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: python scripting for creating geoprocessing.</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/accessing-excel-data-when-publishing-python-script/m-p/154169#M5178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I'm not entirely sure about why you're getting that error, but can tell you that you can't use Excel tables with GP Services in 10.1.&lt;BR /&gt;&lt;BR /&gt;You can use excel as a FILE (there are Python modules which read excel FILES...)&lt;BR /&gt;But ArcGIS Server cannot use Excel TABLES (the sheet you reference in your code with $).&lt;BR /&gt;You'll have to replace the excel table, or access it with other Python modules as a file.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks. actually i want to use the excel sheet data, so planned to convert the excel sheet in to a dbf file which worked good in arcmmap. can u please write what are other python modules to do this if i want to publish this as geoprocessing service. because i need to publish it as geoprocessing service as my client will be using it through browser.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 19:52:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/accessing-excel-data-when-publishing-python-script/m-p/154169#M5178</guid>
      <dc:creator>NadeemQazi</dc:creator>
      <dc:date>2013-05-16T19:52:31Z</dc:date>
    </item>
    <item>
      <title>Re: python scripting for creating geoprocessing.</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/accessing-excel-data-when-publishing-python-script/m-p/154170#M5179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'd use this &lt;/SPAN&gt;&lt;A href="http://www.arcgis.com/home/item.html?id=f3d91b8f852042e289e09a7ec8342431"&gt;http://www.arcgis.com/home/item.html?id=f3d91b8f852042e289e09a7ec8342431&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;We're actually putting those tools into the product at 10.2.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So you can use the Excel to Table tool to take the Excel FILE, turn it into a table that ArcGIS Server supports and continue working on it in the service.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 May 2013 19:55:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/accessing-excel-data-when-publishing-python-script/m-p/154170#M5179</guid>
      <dc:creator>KevinHibma</dc:creator>
      <dc:date>2013-05-16T19:55:45Z</dc:date>
    </item>
  </channel>
</rss>

