Skip to content

Opening workbooks changes file name to lower case #2052

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
qzyu999 opened this issue Oct 11, 2022 · 6 comments
Closed

Opening workbooks changes file name to lower case #2052

qzyu999 opened this issue Oct 11, 2022 · 6 comments
Milestone

Comments

@qzyu999
Copy link

qzyu999 commented Oct 11, 2022

OS (e.g. Windows 10 or macOS Sierra)

Windows 10

Versions of xlwings, Excel and Python (e.g. 0.11.8, Office 365, Python 3.7)

xlwings 0.15.4 Python 2.7

Describe your issue (incl. Traceback!)

I didn't have this issue before, but all of a sudden when I run my script to open a Excel workbook using xw.Book the filename is changed to all lowercase. I tried to open the same file simply using the xw.Book command and the same result happens. Not sure what's causing the filename to be automatically changed to all lower case. I saw the issue here, but the solution listed is not too useful for me.

xw.Book(os.path.join(FILE_PATH, 'FILENAME.xlsm'))

Include a minimal code sample to reproduce the issue (and attach a sample workbook if required!)

xw.Book(os.path.join(FILE_PATH, 'FILENAME.xlsm'))
@fzumstein
Copy link
Member

I don't think there's anything that changed, I believe it's been there forever, but it usually shouldn't cause too much issues as Windows is case-insensitive. However, I agree, it should maintain the proper capitalization in:

book = xw.Book(...)
book.name

@jakubrojcek
Copy link

I have this issue as well. It's unexpected.

@ediouslo
Copy link

ediouslo commented Dec 8, 2022

I have the same issue as well. As a result, I am getting a FileNotFoundError...
Do you know any solution to work around this?

@fzumstein
Copy link
Member

@ediouslo this specific issue shouldn't cause this error. Try to turn your file name into lowercase and let me know should that resolve the issue.

@fzumstein
Copy link
Member

I could only replicate this on macOS, not Windows, but is now fixed in 0.28.9

@ozgurkalan
Copy link

I confirm that the issue is solved.
I am working on a windows 11 PC with Anaconda running. Upgrading solved weird character lowercase confusion with Turkish chars.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

5 participants