Original User: DJBHello Everyone,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. Pretty easy right???WRONG!For some reason I cannot do anything with Excel files in Python. For example???>>> arcpy.env.workspace = r"C:\GIS_Workspace\Projects\Nutrinet_Management_Mapping\NASM_Update\NASMApprovedReport.xls" >>> Tables = arcpy.ListTables() >>> print Tables [] >>>
or..>>> arcpy.env.workspace = r"C:\GIS_Workspace\Projects\Nutrinet_Management_Mapping\NASM_Update\NASMApprovedReport.xls" >>> Tables = arcpy.ListTables() >>> for tab in Tables: print (tab) >>>
What I would like to do is...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)
The Excel spreadsheet itself is clean and tight. I have no spaces or wild/special characters in any of the field headings and the same goes for the worksheet names. 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.[ATTACH=CONFIG]20708[/ATTACH]Any help or advice would be greatly appreciated.Thanks.