<?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 Excel and Python:&amp;nbsp; Friends or Foes? in Transportation Questions</title>
    <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454340#M1561</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: DJB&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello Everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I am attempting to do is not brain surgery but merely take a single Excel file and import all the worksheets into a GDB.&amp;nbsp; Pretty easy right???WRONG!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For some reason I cannot do anything with Excel files in Python.&amp;nbsp; For example???&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.env.workspace = r"C:\GIS_Workspace\Projects\Nutrinet_Management_Mapping\NASM_Update\NASMApprovedReport.xls" &amp;gt;&amp;gt;&amp;gt; Tables = arcpy.ListTables() &amp;gt;&amp;gt;&amp;gt; print Tables [] &amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;or..&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.env.workspace = r"C:\GIS_Workspace\Projects\Nutrinet_Management_Mapping\NASM_Update\NASMApprovedReport.xls" &amp;gt;&amp;gt;&amp;gt; Tables = arcpy.ListTables() &amp;gt;&amp;gt;&amp;gt; for tab in Tables: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print (tab)&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I would like to do is...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;arcpy.env.workspace = r"C:\GIS_Workspace\Projects\Nutrinet_Management_Mapping\NASM_Update\NASMApprovedReport.xls" Tables = arcpy.ListTables() for tab in Tables: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.TableToTable_conversion(tab, r"C:\GIS_Workspace\Python_Scripting\ScratchGDB.gdb", tab)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;The Excel spreadsheet itself is clean and tight.&amp;nbsp; I have no spaces or wild/special characters in any of the field headings and the same goes for the worksheet names.&amp;nbsp; I also created a model to do the very same tasks and it recognizes the excel tables and imports the tables into a GDB successfully.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]20708[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help or advice would be greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 14 Jan 2013 17:32:03 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2013-01-14T17:32:03Z</dc:date>
    <item>
      <title>Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454340#M1561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: DJB&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hello Everyone,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I am attempting to do is not brain surgery but merely take a single Excel file and import all the worksheets into a GDB.&amp;nbsp; Pretty easy right???WRONG!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;For some reason I cannot do anything with Excel files in Python.&amp;nbsp; For example???&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.env.workspace = r"C:\GIS_Workspace\Projects\Nutrinet_Management_Mapping\NASM_Update\NASMApprovedReport.xls" &amp;gt;&amp;gt;&amp;gt; Tables = arcpy.ListTables() &amp;gt;&amp;gt;&amp;gt; print Tables [] &amp;gt;&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;or..&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.env.workspace = r"C:\GIS_Workspace\Projects\Nutrinet_Management_Mapping\NASM_Update\NASMApprovedReport.xls" &amp;gt;&amp;gt;&amp;gt; Tables = arcpy.ListTables() &amp;gt;&amp;gt;&amp;gt; for tab in Tables: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print (tab)&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What I would like to do is...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;arcpy.env.workspace = r"C:\GIS_Workspace\Projects\Nutrinet_Management_Mapping\NASM_Update\NASMApprovedReport.xls" Tables = arcpy.ListTables() for tab in Tables: &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.TableToTable_conversion(tab, r"C:\GIS_Workspace\Python_Scripting\ScratchGDB.gdb", tab)&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;SPAN&gt;The Excel spreadsheet itself is clean and tight.&amp;nbsp; I have no spaces or wild/special characters in any of the field headings and the same goes for the worksheet names.&amp;nbsp; I also created a model to do the very same tasks and it recognizes the excel tables and imports the tables into a GDB successfully.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[ATTACH=CONFIG]20708[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help or advice would be greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 17:32:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454340#M1561</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-01-14T17:32:03Z</dc:date>
    </item>
    <item>
      <title>Re: Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454341#M1562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Wayne_Whitley&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Interesting, and you are having problems with all input spreadsheets?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Any way you can attach a copy of the xls? ...a sample is all that is necessary.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, what version of ArcGIS are you using?...Excel too, what version of Office?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 17:46:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454341#M1562</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-01-14T17:46:35Z</dc:date>
    </item>
    <item>
      <title>Re: Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454342#M1563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Wayne,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've attached an empty spreadsheet that contains the exact same field headings and worksheet names.&amp;nbsp; Unfortunately I couldn't include the data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm currently running ArcGIS 10.1 SP1, Office 2010, Windows 7 (64-bit).&amp;nbsp; The Excel file in question is XLS (97-2003).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;~Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 18:13:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454342#M1563</guid>
      <dc:creator>DanBihari</dc:creator>
      <dc:date>2013-01-14T18:13:58Z</dc:date>
    </item>
    <item>
      <title>Re: Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454343#M1564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: bosewicht&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Well, when you do a print (tab) you get:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Contact$&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Farm$&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;FarmLocation$&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;OperationName$&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Submission$&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So you will probably need to add:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tab = tab[:-1]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;before your table to table to drop the $ from your field names&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 18:52:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454343#M1564</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-01-14T18:52:03Z</dc:date>
    </item>
    <item>
      <title>Re: Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454344#M1565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I can access .xls files like this in v10.1:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; path = r"\\snarf\am\div_lm\ds\gis\projects\workstations\benchmarks\chris\result_tables\merge_20120904.xls"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; arcpy.env.workspace = path&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; tableList = arcpy.ListTables()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; tableList&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[u'PivotTable$', u'RawData$']&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Since the .xls file is treated like a workspace container the script would look something like:
import arcpy
xlsPath = r"\\snarf\am\div_lm\ds\gis\projects\workstations\benchmarks\chris\result_tables\merge_20120904.xls"
fgdbPath = r"C:\temp\test.gdb"
arcpy.env.workspace = xlsPath
tableList = arcpy.ListTables()
for table in tableList:
&amp;nbsp;&amp;nbsp;&amp;nbsp; inTbl = os.path.join(xlsPath,table), 
&amp;nbsp;&amp;nbsp;&amp;nbsp; outTbl = os.path.join(fgdbPathm, table[0:-1]) #get rid of the traling '$' symbol
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyRows(inTbl, outTbl)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to get fancier, you could use the win32com module to fetch values from the .xls file (or the .xlsx file!) ... Then you could have it all.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:15:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454344#M1565</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-11T20:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454345#M1566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: DJB&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hey Wayne,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I thought that may be a problem so I had similar code to parse out the "$",&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;i.e.&lt;/SPAN&gt;&lt;STRONG&gt; tab = tab.split("$")[0]&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Where my frustration comes in is I still do not see anything where as you are seeing the list of tables.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Could it be that I'm missing an excel python library.&amp;nbsp; As you can see below, no results are returned.&amp;nbsp; It's still essentially an empty list.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; import arcpy
&amp;gt;&amp;gt;&amp;gt; arcpy.env.workspace = r"C:\GIS_Workspace\Projects\Nutrinet_Management_Mapping\NASM_Update\NASMApprovedReport.xls"
&amp;gt;&amp;gt;&amp;gt; Tables = arcpy.ListTables()
&amp;gt;&amp;gt;&amp;gt; for tab in Tables:
 tab = tab[:-1]
 print tab

 
&amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;~Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:15:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454345#M1566</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T20:15:55Z</dc:date>
    </item>
    <item>
      <title>Re: Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454346#M1567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, I was able to read everything okay .... but your problem seems to be encountered before that.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just a shot, but do you have the 2007 office system drivers?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 19:11:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454346#M1567</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-01-14T19:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454347#M1568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: DJB&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hey Chris,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your response.&amp;nbsp; As the previous post, I'm still getting an empty list.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; import arcpy
&amp;gt;&amp;gt;&amp;gt; path = r"C:\GIS_Workspace\Projects\Nutrinet_Management_Mapping\NASM_Update\NASMApprovedReport.xls"
&amp;gt;&amp;gt;&amp;gt; arcpy.env.workspace = path
&amp;gt;&amp;gt;&amp;gt; tableList = arcpy.ListTables()
&amp;gt;&amp;gt;&amp;gt; tableList
[]
&amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;~Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:15:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454347#M1568</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T20:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454348#M1569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hmmm, I was able to list them just fine, but I'm at ver 10.0 and have Office 2007, meaning by default I have the 2007 system drivers.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just a shot in the dark, but that seems to have been a problem at the upgrade of Office not to include the drivers ArcGIS 10.0 needed....not sure if those are included with 10.1 but those drivers are also provided separately, see this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.microsoft.com/en-us/download/details.aspx?id=23734"&gt;http://www.microsoft.com/en-us/download/details.aspx?id=23734&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"If you have Microsoft Excel 2010 or no version of Microsoft Excel installed, you must install the 2007 driver before you can use either .xls or .xlsx files."&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#//005s0000001w000000"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#//005s0000001w000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I know you said you could access the xls tables in a model, so that leaves doubt this is the problem, but I do not know if the same drivers are used in that environment...&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 19:13:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454348#M1569</guid>
      <dc:creator>T__WayneWhitley</dc:creator>
      <dc:date>2013-01-14T19:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454349#M1570</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: csny490&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I use your .xls file, I get a table list of [u'Contact$', u'Farm$', u'FarmLocation$', u'OperationName$', u'Submission$']&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What version of ArcGIS are you running?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;What version of MS Office?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 20:18:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454349#M1570</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-01-14T20:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454350#M1571</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Maybe a dumb question: Are you sure that the path to your xls file is correct? Strangely, you can set the workspace to a non-existant .xls file with no error, and it will yield of course, an empty table list&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Make sure the .xls file path exists:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import os
os.path.exists(xlsFilePath)&lt;/PRE&gt;&lt;SPAN&gt;It should retern True, otherwise there's you problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:16:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454350#M1571</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2021-12-11T20:16:01Z</dc:date>
    </item>
    <item>
      <title>Re: Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454351#M1572</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Wayne_Whitley&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good point Chris... I didn't think of that.&amp;nbsp; That would certainly be a reason to call it time for a beer I'd say.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But see Dan's post #3 I think, that he's "...running ArcGIS 10.1 SP1, Office 2010, Windows 7 (64-bit). The Excel file in question is XLS (97-2003)."&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, in his very 1st post he says he's doing the exact same thing in a model... so you'd think that the pathnames are reading okay.&amp;nbsp; Stranger things have happened, I guess, and can't leave anything to chance.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 14 Jan 2013 20:56:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454351#M1572</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-01-14T20:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454352#M1573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Chris,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm running ArcGIS 10.1 SP1 and Office 2010.&amp;nbsp; I tried the Exist code that you provided and it did return true.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Wayne, you suggested downloading the Office 2007 system driver.&amp;nbsp; I downloaded it and installed it.&amp;nbsp; I found the instructions a bit confusing.&amp;nbsp; After the driver is installed is there any additional steps that I need to take?&amp;nbsp; The reason why I ask is it unfortunately did not correct my problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;~Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 11:57:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454352#M1573</guid>
      <dc:creator>DanBihari</dc:creator>
      <dc:date>2013-01-15T11:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454353#M1574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: Wayne_Whitley&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am at a loss for an answer - so you say you are able to open a worksheet from this file in ArcMap, or preview it in Catalog?&amp;nbsp; Check that if you haven't already, and if you will, use the same path in your script just to be certain you're 'looking at' the same xls.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To help isolate where the error is coming from, I would try saving a copy of the xls in newer format with your Office 2010 software, then see if you can access that by script, listing as you were doing before.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Other than that, it may be time for a support call.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT:&amp;nbsp; Are you using the 64-bit background geoprocessing?- check this out:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;10.1 sp 1 and 32/64 bit Python versions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/threads/70241-10.1-sp-1-and-32-64-bit-Python-versions?p=245700#post245700" rel="nofollow" target="_blank"&gt;http://forums.arcgis.com/threads/70241-10.1-sp-1-and-32-64-bit-Python-versions?p=245700#post245700&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also, Kevin Hibma comments here:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://blogs.esri.com/esri/arcgis/2012/10/31/announcing-64-bit-geoprocessing/" rel="nofollow" target="_blank"&gt;http://blogs.esri.com/esri/arcgis/2012/10/31/announcing-64-bit-geoprocessing/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dpettittva says:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Just to clarify, I assume that doing any processing in a standalone Python script (assuming you???re using a 64-bit version of Python) still runs into the issue where the following data types are unsupported in 64-bit processing (just like they are w/in ArcMap), right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ???Personal geodatabase (.mdb)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ???Excel tables (.xls, .xlsx)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; ???OLEDB connections&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;November 7, 2012 at 10:35 am&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;khibma says:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;dpettittva, correct. These are limitations within the 64-bit processing framework (not limited to ArcMap)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 12:28:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454353#M1574</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-01-15T12:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454354#M1575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The 64-bit background theory sounds very plausible - I bet that one will be a common stumbling point for many of us going forward.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dan, you are able to list non-xls tables via arcpy, right? Like tables in a FGDB?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you &lt;/SPAN&gt;&lt;SPAN style="text-decoration:underline;"&gt;don't&lt;/SPAN&gt;&lt;SPAN&gt; have the 64-bit background gp thing installed... Hmm. I'm out oif ideas...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Except for plan Z:Complete uninstall/reinstall of ArcGIS and Office. Install Office 1st, then ArcGIS.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 15:02:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454354#M1575</guid>
      <dc:creator>ChrisSnyder</dc:creator>
      <dc:date>2013-01-15T15:02:50Z</dc:date>
    </item>
    <item>
      <title>Re: Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454355#M1576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: DJB&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hey Wayne,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think you might be onto something.&amp;nbsp; I just installed 64-bit background geoprocessing before Christmas.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I just need to figure out how to run my script in python 32.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your help Wayne.&amp;nbsp; That was a great find!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;~Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 15:03:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454355#M1576</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-01-15T15:03:24Z</dc:date>
    </item>
    <item>
      <title>Re: Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454356#M1577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Chris,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am able to view and list tables in a FGDB.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; import arcpy
&amp;gt;&amp;gt;&amp;gt; arcpy.env.workspace = r"C:\GIS_Workspace\Python_Scripting\ScratchGDB.gdb"
&amp;gt;&amp;gt;&amp;gt; tables = arcpy.ListTables()
&amp;gt;&amp;gt;&amp;gt; tables
[u'Contact', u'Farm', u'FarmLocation', u'FarmRollNumber', u'MaterialType', u'MaterialTypeComponent', u'NAALocation', u'NAARollNumber', u'NASMApplicationArea', u'OperationName', u'Storage', u'StorageNASMLocation', u'StorageNASMRollNumber', u'Submission']
&amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;~Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:16:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454356#M1577</guid>
      <dc:creator>DanBihari</dc:creator>
      <dc:date>2021-12-11T20:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454357#M1578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: csny490&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think Wayne nailed it. To gather further evidence, try listing the contents of a .mdb (which is also unsuported in 64-bit background gp like Wayne says).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The 'simple' fix then is to run your python script:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. As a forground process via ArcMap (not as a background process)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Via a 32-bit Python IDE - not the 64-bit version.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would recomend also, that if you don't need it, uninstall the 64-bit background gp.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe a bit more complicated, is to run 32-bit python as a subprocess from your 'master' script (which can continute to run however you want).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 15 Jan 2013 15:15:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454357#M1578</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-01-15T15:15:31Z</dc:date>
    </item>
    <item>
      <title>Re: Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454358#M1579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Chris, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You're last sentence, how would you run a sub-process as 32-bit python.&amp;nbsp; Using ESRI help (&lt;/SPAN&gt;&lt;A href="http://blogs.esri.com/esri/arcgis/2012/11/12/python-scripting-with-64-bit-processing/" rel="nofollow noopener noreferrer" target="_blank"&gt;http://blogs.esri.com/esri/arcgis/2012/11/12/python-scripting-with-64-bit-processing/&lt;/A&gt;&lt;SPAN&gt;) and &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/70241-10.1-sp-1-and-32-64-bit-Python-versions?p=245700#post245700" rel="nofollow noopener noreferrer" target="_blank"&gt;Kevin Hibma thread&lt;/A&gt;&lt;SPAN&gt;, I successfully ran my Python script.&amp;nbsp; It is definitely a 64-bit Python problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;C:\GIS_Workspace\Python_Scripting&amp;gt;C:\Python27\ArcGIS10.1\python.exe NASM_Layer_Creator.py

C:\GIS_Workspace\Python_Scripting&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The reason I ask about sub-processes within a master script is it would be nice to have it run outside of Command Prompt.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My ultimate end goal is to create multiple data layers, from Excel files, on a weekly basis using Scheduled Tasks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks Wayne and Chris for all your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:16:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454358#M1579</guid>
      <dc:creator>DanBihari</dc:creator>
      <dc:date>2021-12-11T20:16:07Z</dc:date>
    </item>
    <item>
      <title>Re: Excel and Python:  Friends or Foes?</title>
      <link>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454359#M1580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: csny490&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The basic command is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import subprocess
subprocess.Popen([pythonExePath, childScriptPath, str(inputVar1), str(inputVar2)], shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You would then use the path to 32-bit Python for the pythonExePath variable. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An example of using subprocess to create a psudo-parallel process (32-bit) is here: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/33602-Arcpy-Multiprocessor-issues?p=177418&amp;amp;viewfull=1#post177418" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.arcgis.com/threads/33602-Arcpy-Multiprocessor-issues?p=177418&amp;amp;viewfull=1#post177418&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Read this too: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/33602-Arcpy-Multiprocessor-issues?p=179790&amp;amp;viewfull=1#post179790" rel="nofollow noopener noreferrer" target="_blank"&gt;http://forums.arcgis.com/threads/33602-Arcpy-Multiprocessor-issues?p=179790&amp;amp;viewfull=1#post179790&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:16:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/transportation-questions/excel-and-python-nbsp-friends-or-foes/m-p/454359#M1580</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-11T20:16:09Z</dc:date>
    </item>
  </channel>
</rss>

