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

Excel worksheets not opening as expected #199

Open
jmichels9 opened this issue Dec 3, 2024 · 1 comment
Open

Excel worksheets not opening as expected #199

jmichels9 opened this issue Dec 3, 2024 · 1 comment

Comments

@jmichels9
Copy link

jmichels9 commented Dec 3, 2024

I'm trying to open an Excel worksheet using the TryOpenWorksheet method from ExcelDataReader. However, the method is continuously returning false, and failing to open the sheet. After some initial debugging, I was able to get into the OpenWorksheet method of XlsxWorkbookReader. From there, I took this screenshot:

image

Based on that screenshot, you can see the sheet part variable (line 219) is including a leading \ character. There's logic in place (on line 220 in the screenshot) that appears to be removing a forward slash instead. I was curious if adding similar logic to strip the backslash is possible or advisable.

Thanks!

P.S. For reference, here are 2 files - the "bad" file which has a sheet failing to open and a nearly identical "good" file that loads as expected after I open/save the "bad" file directly in Excel:

sample_file_bad.xlsx
sample_file_good.xlsx

@MarkPflug
Copy link
Owner

This should be fixed in the next release. Fixed with #201

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