Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Error: Using Search Cursor on XLS File

$
0
0
I am trying to cursor search through a .xls file using
Code:

arcpy.SearchCursor
My code is this:
Code:

xls = r"\\spatialfiles.work\Local\scripts\python\Excel\Report.xls\'Dataset selection$'"

for row in arcpy.SearchCursor(xls):
    print row.getValue("Layer")

I'm baffled. Yesterday this code worked fine. Today I am getting an error:

Quote:

IOError: "\\spatialfiles.work\Local\scripts\python\Excel\Report.xls\'Dataset selection$'"
does not exist
The xls file does exist. I can navigate to it in ArcCataloge without issue and view the table. The path is correct because I copied and pasted it right out of Catalogue.

Can anyone suggest why this is occuring?


Thanks,
Mike

Viewing all articles
Browse latest Browse all 2485

Latest Images

Trending Articles



Latest Images