>>> arcpy.env.workspace = r"C:\GIS_Workspace\Projects\Nutrinet_Management_Mapping\NASM_Update\NASMApprovedReport.xls" >>> Tables = arcpy.ListTables() >>> print Tables [] >>>
>>> arcpy.env.workspace = r"C:\GIS_Workspace\Projects\Nutrinet_Management_Mapping\NASM_Update\NASMApprovedReport.xls" >>> Tables = arcpy.ListTables() >>> for tab in Tables: print (tab) >>>
arcpy.env.workspace = r"C:\GIS_Workspace\Projects\Nutrinet_Management_Mapping\NASM_Update\NASMApprovedReport.xls" Tables = arcpy.ListTables() for tab in Tables: arcpy.TableToTable_conversion(tab, r"C:\GIS_Workspace\Python_Scripting\ScratchGDB.gdb", tab)
Solved! Go to Solution.
import os os.path.exists(xlsFilePath)It should retern True, otherwise there's you problem.
>>> import arcpy >>> arcpy.env.workspace = r"C:\GIS_Workspace\Python_Scripting\ScratchGDB.gdb" >>> tables = arcpy.ListTables() >>> 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'] >>>
C:\GIS_Workspace\Python_Scripting>C:\Python27\ArcGIS10.1\python.exe NASM_Layer_Creator.py C:\GIS_Workspace\Python_Scripting>
import subprocess subprocess.Popen([pythonExePath, childScriptPath, str(inputVar1), str(inputVar2)], shell=False, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE)