If you have an .xlsx file you want to use in ArcGIS but do not have Excel 2007 installed, you will need to install the 2007 Office System Driver. It can be downloaded here from the Microsoft Download Center. If you have Microsoft Excel 2010 or no version of Microsoft Excel installed, you must install the 2007 driver before you can use either .xls or .xlsx files.
#Open spreadsheet with info xls = <spreadsheet location> # Create search cursor to parse spreadsheet info rows = arcpy.SearchCursor(xls) for row in rows: # Set username/password for each connection as variable user = row.USER password = row.PASSWORD
# this works xls = r"J:\test\excelfile.xlsx\sheet1$" # this doesn´t xls1 = r"J:\test\excelfile.xlsx"
hi Ben,
did you specify the worksheet (marked with the "$" sign at the end) as well, not just the .xslx file?
i get the 999999 error if i only point to the .xlsx files´location.# this works xls = r"J:\test\excelfile.xlsx\sheet1$" # this doesn´t xls1 = r"J:\test\excelfile.xlsx"