<?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: Table to Excel export using python in ArcSDE  in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/table-to-excel-export-using-python-in-arcsde/m-p/600845#M46943</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have done it manually, perhaps you can use the information in the Results window&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/executing-tools/using-the-results-window.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/executing-tools/using-the-results-window.htm"&gt;Using the Results window—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;maybe even exporting to a python snippet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Jul 2016 22:18:49 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2016-07-21T22:18:49Z</dc:date>
    <item>
      <title>Table to Excel export using python in ArcSDE</title>
      <link>https://community.esri.com/t5/python-questions/table-to-excel-export-using-python-in-arcsde/m-p/600844#M46942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;I am wanting to (from Windows 10 desktop) to run a python script that exports the table from feature classes, within a feature dataset, in an ArcSDE environment. I can manually run the script in ArcMap everyday, but this will add to the tasks that I already have. I need the script to run outside of ArcGIS so I can automatically run the script with Scheduled Tasks in Windows.&lt;/P&gt;&lt;P&gt;I have created the connection file and can list feature datasets and classes but I cannot figure out how to use the arcpy "table to excel" tool on the feature datasets within feature classes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I have so far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Import arcpy module&lt;/P&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;from arcpy import env&lt;/P&gt;&lt;P&gt;import os&lt;/P&gt;&lt;P&gt;arcpy.env.workspace = "G:\Location_of_Connection.sde_file"&lt;/P&gt;&lt;P&gt;Utility_Pipe = "Utility_pipe_???_Unsure how to point directly at the FC in SDE"&lt;/P&gt;&lt;P&gt;Utility_xls = "Location of Utility Excel\Utility.xls"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Process: Table To Excel&lt;/P&gt;&lt;P&gt;arcpy.TableToExcel_conversion(Utility_Pipe, Utility_xls, "NAME", "CODE")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;print "done"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I using ArcMap 10.3.1 in an enterprise geodatabase on windows 10.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2016 21:56:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/table-to-excel-export-using-python-in-arcsde/m-p/600844#M46942</guid>
      <dc:creator>DougMerrick</dc:creator>
      <dc:date>2016-07-21T21:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Table to Excel export using python in ArcSDE</title>
      <link>https://community.esri.com/t5/python-questions/table-to-excel-export-using-python-in-arcsde/m-p/600845#M46943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you have done it manually, perhaps you can use the information in the Results window&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/arcmap/latest/analyze/executing-tools/using-the-results-window.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/executing-tools/using-the-results-window.htm"&gt;Using the Results window—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;maybe even exporting to a python snippet&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2016 22:18:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/table-to-excel-export-using-python-in-arcsde/m-p/600845#M46943</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-07-21T22:18:49Z</dc:date>
    </item>
    <item>
      <title>Re: Table to Excel export using python in ArcSDE</title>
      <link>https://community.esri.com/t5/python-questions/table-to-excel-export-using-python-in-arcsde/m-p/600846#M46944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I looked at that before realizing that by using a python script to run the model itself would reduce the coding headache significantly.&lt;BR /&gt;The python script to run the model can be found here &lt;A href="http://joelmccune.com/run-models-as-scheduled-tasks/" title="http://joelmccune.com/run-models-as-scheduled-tasks/"&gt;http://joelmccune.com/run-models-as-scheduled-tasks/&lt;/A&gt; &lt;/P&gt;&lt;P&gt;When making the model, add the data directly from the source (ie. NCGIS.GIS.UtilityMain instead of from the table of Contents-Utility Main).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2016 22:48:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/table-to-excel-export-using-python-in-arcsde/m-p/600846#M46944</guid>
      <dc:creator>DougMerrick</dc:creator>
      <dc:date>2016-07-21T22:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: Table to Excel export using python in ArcSDE</title>
      <link>https://community.esri.com/t5/python-questions/table-to-excel-export-using-python-in-arcsde/m-p/600847#M46945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#//001200000027000000" rel="nofollow"&gt;Table to Table (Conversion)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class="kwd"&gt;import&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; arcpy&lt;BR /&gt;fc &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; r&lt;/SPAN&gt;&lt;SPAN class="str"&gt;'C:\path\to\your\fc'&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;&lt;BR /&gt;outtable &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; r&lt;/SPAN&gt;&lt;SPAN class="str"&gt;'C:\temp'&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE&gt;&lt;SPAN class="pln"&gt;&lt;BR /&gt;arcpy&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ"&gt;TableToTable_conversion&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln"&gt;fc&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; outtable&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln"&gt; &lt;/SPAN&gt;&lt;SPAN class="str"&gt;'outtableFile.dbf'&lt;/SPAN&gt;&lt;SPAN class="pun"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jul 2016 22:57:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/table-to-excel-export-using-python-in-arcsde/m-p/600847#M46945</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2016-07-21T22:57:53Z</dc:date>
    </item>
    <item>
      <title>Re: Table to Excel export using python in ArcSDE</title>
      <link>https://community.esri.com/t5/python-questions/table-to-excel-export-using-python-in-arcsde/m-p/600848#M46946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was able to get this to work on local data, but pointing the fc to the specific feature class in the versioned ArcSDE environment was proving troublesome. So I went with the solution I detailed above.&lt;/P&gt;&lt;P&gt;Thanks though&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jul 2016 15:47:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/table-to-excel-export-using-python-in-arcsde/m-p/600848#M46946</guid>
      <dc:creator>DougMerrick</dc:creator>
      <dc:date>2016-07-22T15:47:05Z</dc:date>
    </item>
  </channel>
</rss>

