8000 `file_name` argument supports `pathlib.Path` · Issue #263 · pyexcel/pyexcel · GitHub
[go: up one dir, main page]

Skip to content

file_name argument supports pathlib.Path #263

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

Closed
Zeroto521 opened this issue Jun 21, 2022 · 1 comment
Closed

file_name argument supports pathlib.Path #263

Zeroto521 opened this issue Jun 21, 2022 · 1 comment

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
chfw added a commit that referenced this issue Apr 10, 2025
chfw added a commit that referenced this issue Apr 12, 2025
chfw added a commit that referenced this issue Apr 12, 2025
chfw added a commit that referenced this issue Apr 12, 2025
chfw added a commit that referenced this issue Apr 12, 2025
@chfw
Copy link
Member
chfw commented Apr 12, 2025

released in 0.7.3

@chfw chfw closed this as completed Apr 12, 2025
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

2 participants
0