I can't read excel files with data access search cursor since I upgrade to Python 64 background processing. I have the office system drivers so that's not the problem. Also, I was able to read excels files fine before I upgraded. I even tried the same script in a computer running on Python 32 and then in mine with Python 64,.It worked in Python 32, but failed in Python 64 so I'm pretty sure the problem is with Python 64.
Have anyone run into this or knows how to fix it?
Here a simple example of what I can't do anymore:
import arcpy spreadsheet = r'spreadsheet.xlsx\Sheet1$' with arcpy.da.SearchCursor(spreadsheet, 'name') as cursor: for row in cursor: print row[0]
Thanks,
Michael
Solved! Go to Solution.
do you not have to specify paths to the file or is it know already or added to arcmap? All threads I have seen show examples with the full path specified. For example,
EDIT
This might explain it
ArcGIS Help (10.2, 10.2.1, and 10.2.2)
The following data types are unsupported in 64-bit processing:
If your workflow involves any of the above data types, you can execute the tool in the foreground by disabling background processing or convert your data to a supported type, then execute the tool in the background.
Coverage data is supported as input to tools, but it is not a valid output type.
do you not have to specify paths to the file or is it know already or added to arcmap? All threads I have seen show examples with the full path specified. For example,
EDIT
This might explain it
ArcGIS Help (10.2, 10.2.1, and 10.2.2)
The following data types are unsupported in 64-bit processing:
If your workflow involves any of the above data types, you can execute the tool in the foreground by disabling background processing or convert your data to a supported type, then execute the tool in the background.
Coverage data is supported as input to tools, but it is not a valid output type.
Uhh, that sucks. I thought there would be a work around or something.