Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file_name argument supports pathlib.Path #263

Open
Zeroto521 opened this issue Jun 21, 2022 · 0 comments
Open

file_name argument supports pathlib.Path #263

Zeroto521 opened this issue Jun 21, 2022 · 0 comments

Comments

@Zeroto521
Copy link

Zeroto521 commented Jun 21, 2022

Description

I prefer Path rather than the path string.
Path operates path string more friendly (such as connecting paths via /).
And Path get more and more popular.

Whether pyexcel would support Path?

Example

from pathlib import Path

import pyexcel as pe

file = Path("demo.xlsx")
pe.get_sheet(file_name=file)
# raise OSError: Unsupported file type

pe.get_sheet(file_name=file.as_posix())
# work, `file_name` only receives string type

Environment

  • Win10 21H2
  • python 3.9.13.final.0
  • pyexcel 0.7.0
  • pyexcel-io 0.6.6
  • pyexcel-xls 0.6.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant