<?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 Create file GDB, importing tables results in empty list when using arcpy.ListTables() in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/create-file-gdb-importing-tables-results-in-empty/m-p/193331#M14838</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm creating a file GDB and then importing tables (Excel) with TableToGeodatabase. After that I want to list them using arcpy.ListTables but it results in an empty list, even though they are there when I check in ArcCatalouge. In ArcCatalouge I can copy the tables for example but in the Python window I can't list them or access them (like they don't exist).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, if I create a file geodatabase in ArcCatalouge and then import the tables using right click &amp;gt; import (table, multiple) the tables will show up in Python using arcpy.ListTables()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy&amp;nbsp; # Get parameters to create geodatabase OutputFolder = arcpy.GetParameterAsText(0) FGDName = arcpy.GetParameterAsText(1)&amp;nbsp; # Create File GDB... OutputGDB = OutputFolder + '\\' + FGDName + '.gdb' arcpy.management.CreateFileGDB(OutputFolder, FGDName)&amp;nbsp; # Set current workspace to to file geodatabase arcpy.env.workspace = OutputFolder&amp;nbsp; # Get parameters to import tables to geodatabase adress = arcpy.GetParameterAsText(2) adress_xy = arcpy.GetParameterAsText(3)&amp;nbsp; # Import tables to geodatabase arcpy.conversion.TableToGeodatabase([adress, adress_xy], OutputGDB)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be greatly appreciated-&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/ Rickard&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 31 Jul 2012 13:22:11 GMT</pubDate>
    <dc:creator>RickardHansen</dc:creator>
    <dc:date>2012-07-31T13:22:11Z</dc:date>
    <item>
      <title>Create file GDB, importing tables results in empty list when using arcpy.ListTables()</title>
      <link>https://community.esri.com/t5/python-questions/create-file-gdb-importing-tables-results-in-empty/m-p/193331#M14838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm creating a file GDB and then importing tables (Excel) with TableToGeodatabase. After that I want to list them using arcpy.ListTables but it results in an empty list, even though they are there when I check in ArcCatalouge. In ArcCatalouge I can copy the tables for example but in the Python window I can't list them or access them (like they don't exist).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, if I create a file geodatabase in ArcCatalouge and then import the tables using right click &amp;gt; import (table, multiple) the tables will show up in Python using arcpy.ListTables()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy&amp;nbsp; # Get parameters to create geodatabase OutputFolder = arcpy.GetParameterAsText(0) FGDName = arcpy.GetParameterAsText(1)&amp;nbsp; # Create File GDB... OutputGDB = OutputFolder + '\\' + FGDName + '.gdb' arcpy.management.CreateFileGDB(OutputFolder, FGDName)&amp;nbsp; # Set current workspace to to file geodatabase arcpy.env.workspace = OutputFolder&amp;nbsp; # Get parameters to import tables to geodatabase adress = arcpy.GetParameterAsText(2) adress_xy = arcpy.GetParameterAsText(3)&amp;nbsp; # Import tables to geodatabase arcpy.conversion.TableToGeodatabase([adress, adress_xy], OutputGDB)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be greatly appreciated-&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;/ Rickard&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 13:22:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-file-gdb-importing-tables-results-in-empty/m-p/193331#M14838</guid>
      <dc:creator>RickardHansen</dc:creator>
      <dc:date>2012-07-31T13:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: Create file GDB, importing tables results in empty list when using arcpy.ListTabl</title>
      <link>https://community.esri.com/t5/python-questions/create-file-gdb-importing-tables-results-in-empty/m-p/193332#M14839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Try using this tool: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/RefreshCatalog/000v0000004z000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/RefreshCatalog/000v0000004z000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;to give ArcGIS a kick in the ... before you make the table list.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 13:57:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-file-gdb-importing-tables-results-in-empty/m-p/193332#M14839</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2012-07-31T13:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Create file GDB, importing tables results in empty list when using arcpy.ListTabl</title>
      <link>https://community.esri.com/t5/python-questions/create-file-gdb-importing-tables-results-in-empty/m-p/193333#M14840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It didn't work to kick ArcGIS in the... However, I found a solution (sort of).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;When I use arcpy.ListTables() in the Python interpreter in ArcCataloge it won't list any tables in excel format but will list tables in dbf format. However, my intention was to use it in a script tool and there arcpy.ListTables works just fine with excel format. I'm not sure but I think it has something to do with formatting pathways. In my script to I use arpy.GetParameterAsText and that works fine.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 09:16:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-file-gdb-importing-tables-results-in-empty/m-p/193333#M14840</guid>
      <dc:creator>RickardHansen</dc:creator>
      <dc:date>2012-08-02T09:16:38Z</dc:date>
    </item>
    <item>
      <title>Re: Create file GDB, importing tables results in empty list when using arcpy.ListTabl</title>
      <link>https://community.esri.com/t5/python-questions/create-file-gdb-importing-tables-results-in-empty/m-p/193334#M14841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Never had much consistent luck with using .xls files as an "ESRI-friendly" format... In my experience, it's best to use .dbf, .txt, .csv, etc. if you can.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, in v10.1 it seems to work for me (the .xls file is considered a workspace):&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt; import arcpy &amp;gt;&amp;gt;&amp;gt; arcpy.env.workspace = r"C:\Temp\logist_reg_merge_20120725_runs.xls" &amp;gt;&amp;gt;&amp;gt; tblList = arcpy.ListTables() &amp;gt;&amp;gt;&amp;gt; print tblList [u'PivotReport$', u'RawData$', u'Sheet1$', u'Sheet2$']&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Aug 2012 15:46:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-file-gdb-importing-tables-results-in-empty/m-p/193334#M14841</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2012-08-02T15:46:16Z</dc:date>
    </item>
    <item>
      <title>Re: Create file GDB, importing tables results in empty list when using arcpy.ListTabl</title>
      <link>https://community.esri.com/t5/python-questions/create-file-gdb-importing-tables-results-in-empty/m-p/193335#M14842</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I just figured it out with your help, thanks! When I use GetParameterAsText I actually point out the table in the Excel file, not the Excel file itself, which is exactly what you're doing when setting the Excel file as a workspace. I tried and tried listing the Excel file (not the table within) while having the folder as a workspace. That kinda make sense now.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 07:30:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-file-gdb-importing-tables-results-in-empty/m-p/193335#M14842</guid>
      <dc:creator>RickardHansen</dc:creator>
      <dc:date>2012-08-03T07:30:24Z</dc:date>
    </item>
  </channel>
</rss>

