0

I tried to open the excel using the code given below:

loc="/Users/shruti/Downloads/user.xlsx"
wb=xlrd.open_workbook(loc)

I get the following error.

XLRDError: Excel xlsx file; not supported

How do I resolve it?

pppery
  • 3,550
  • 19
  • 28
  • 41
  • [xlrd](https://pypi.org/project/xlrd/) is a library for reading data and formatting information from Excel files in the historical **.xls** format. use other libs such as *openpyxl* – Lei Yang Mar 10 '22 at 14:00
  • 2
    Possible duplicate of [xlrd.biffh.XLRDError: Excel xlsx file; not supported](https://stackoverflow.com/questions/65254535/xlrd-biffh-xlrderror-excel-xlsx-file-not-supported) – pppery Mar 10 '22 at 21:31

1 Answers1

-1

Use another library to open xlsx format files like Panda with openpyxl for example, see this answer

Timmy
  • 15
  • 2
  • 7
  • It would be better if the question was marked as a duplicate if the answer can be found in another post – TheFungusAmongUs Mar 10 '22 at 14:59
  • I dont have enough rep to do that so thats why I made it a comment – Timmy Mar 10 '22 at 20:15
  • While your contribution certainly would be useful, there are rep requirements in place for a reason (see [this meta post](https://meta.stackoverflow.com/questions/258610/how-should-one-ask-for-clarification-on-a-question-if-they-cant-yet-comment)). Once you have 15 reputation (1 accepted answer or 2 upvotes on your posts, etc...), you will be able to flag a post like this. – TheFungusAmongUs Mar 11 '22 at 03:02