This probably means that wb has not loaded a spreadsheet, so the sheets list is null (there is no sheet 0). Perhaps your file is in the wrong place, or invalid, or is a version of excel that doesnāt work with this excel import code written before 2014.
On the page you linked there are comments. Someone had the same problem as you, and someone else suggested a way of formatting the file path. The file path format depends on whether you are on Mac or Windows, however.
The āsolutionā comment has been autoformatted with smart quotes (curly) ā breaking it. you will need to change them into straight quotes before trying it.
Beyond that, hard to know without seeing your code.
I have tried to write only the name of the Excel file, but it show me the error.
If I write the file path as described in the comment, it marks an error: Not expecting symbol āUā, which is LATIN CAPITAL LETTER U.
Dennis thank you a lot, I was able to solve the problem of reading the excel file, with your suggested.
I didnāt think of writing the path for how you suggested to me.
How should write the path on mac?
thank you very much to both