xlsxPath = reportFolder+"earthquakeReport.xlsx" xlsxDatedReport = reportFolderDated+"earthquakeReport_{}.xlsx".format(datetime.strftime(datetime.now(),"%Y-%m-%d_%H%M")) xList = "DATE;MAGNITUDE;EPICENTER" arcpy.ImportToolbox("C:/Program Files (x86)/DataEast/XTools Pro/Toolbox/XTools Pro.tbx") arcpy.gp.XToolsGP_Export2Excel(eqPoliciesFC,xList,xlsxPath) # error = "pythonw.exe has stopped working" arcpy.XToolsPro_Export2Excel(eqPoliciesFC,xList,xlsxPath) # error = <type 'exceptions.AttributeError'>: 'module' object has no attribute 'XToolsPro_Export2Excel'
# Import arcpy module import arcpy # Load required toolboxes arcpy.ImportToolbox("C:/Program Files (x86)/DataEast/XTools Pro/Toolbox/XTools Pro.tbx") # Local variables: eqPolicies = "C:\\arcgisserver\\gisData\\services\\eqMap\\data\\eqMap.gdb\\eqPolicies" excelTest_xlsx = "C:\\arcgisserver\\gisData\\services\\eqMap\\data\\excelTest.xlsx" # Process: Export Table to MS Excel arcpy.gp.toolbox = "C:/Program Files (x86)/DataEast/XTools Pro/Toolbox/XTools Pro.tbx"; arcpy.XToolsGP_Export2Excel_eqMapAnalysis(eqPolicies, "DATE;MAGNITUDE;EPICENTER", excelTest_xlsx, "true")
Solved! Go to Solution.
>>> arcpy.XToolsGP_Export2Excel(r'D:\Users\cprice\outWorkspaceTable.dbf',"TABLE_ID", "test.xlsx") Runtime error Traceback (most recent call last): File "<string>", line 1, in <module> File "C:\Program Files (x86)\DataEast\XTools Pro\Toolbox\XTools Pro.tbx", line 754, in XToolsGP_Export2Excel ExecuteError: Failed to execute. Parameters are not valid. ERROR 000816: The tool is not valid. Failed to execute (XToolsGP_Export2Excel).
I made this tool about 6 months ago. It works pretty nicely to export tables to excel. There is also an option to exclude fields. See attached toolbox.
Here is a view of the checkbox for excluding the fields:
[ATTACH=CONFIG]30998[/ATTACH]
And here is the toolbox:
Gave it a test run, but it appears that I don't have the openpyxl files.