Feature Request: read_excel sheet_name argument
See original GitHub issueI would love to be able to only read in un-hidden sheets. this could be a new possible value that can be passed to the sheet_name
argument.
alternatively, what would also solve my problem is some way to filter the columns (again, probably for sheet_name
). ideally be able to use regex or string comparison to choose which sheets to read.
also, what about being able to specify which sheets to be ignored?
Issue Analytics
- State:
- Created 6 years ago
- Comments:13 (8 by maintainers)
Top Results From Across the Web
pandas.read_excel — pandas 1.5.2 documentation
Supports an option to read a single sheet or a list of sheets. Parameters. iostr, bytes, ExcelFile, xlrd.Book, path object, or file-like object....
Read more >Using Pandas to pd.read_excel() for multiple worksheets of ...
Note that the sheet_name argument to pd.read_excel() can be the name of the sheet (as above), an integer specifying the sheet number (eg...
Read more >Error message when you open or save a file in Microsoft Excel
This error message occurs when you save or open a file if the path to the file (including the file name) exceeds 218...
Read more >How to correct a #NAME? error - Microsoft Support
Solution: Define a name in Name Manager, and then add the name to the formula. Follow these steps to do that: If you...
Read more >Data Factory XLSX Wildcard File Path Used but I cant ...
Here is an existing feature request from ADF user voice forum submitted by other users - Get list of Excel sheet names.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@rhshadrach yes, at least for .xls and .xlsx/.xlsm files, checking for hidden sheets is really easy ahead of time:
I like your cookbook suggestion; I’ll make a very small PR.
@tres-pitt : Thanks for the report! Let me dissect this a bit:
Checking for whether a sheet is hidden would be tricky unless we were somehow able to surface an attribute for visibility. Not sure if that’s something we have available, but open to investigation.
Your suggestion of
regex
wouldn’t be particularly hard to add, though I’m not sure how great the use-case would be for such an enhancement. Regex is not a very user-friendly option for most.I’m more a fan of your suggestion to skip sheets. We do this with columns, so I don’t see why we couldn’t do the same with Excel sheets.
So IMO 1 and 3 would be the best ways to go, with 3 being the easiest to implement.