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

header_row does not work as expected if there are blank rows #233

Open
noctuid opened this issue Apr 17, 2024 · 6 comments
Open

header_row does not work as expected if there are blank rows #233

noctuid opened this issue Apr 17, 2024 · 6 comments
Milestone

Comments

@noctuid
Copy link

noctuid commented Apr 17, 2024

If I put expect the header on e.g. row index 15, but there are blank rows (at least at the beginning of the sheet), I cannot do header_row=15. It looks like they are ignored, so I have to put in a lower index.

@PrettyWood
Copy link
Member

Hello!
can you please provide an excel sheet example?

@noctuid
Copy link
Author

noctuid commented Apr 17, 2024

I will try to create a basic sheet to reproduce. It seems the issue is not actually with blank rows, but there is some other reason I am having to put in a much lower index than I expect.

@noctuid
Copy link
Author

noctuid commented Apr 17, 2024

It looks like it does have to do with empty rows in some case.. not exactly clear to me, but it's very easy to reproduce with this file:

TestFastExcelRead.xlsx

I have the header row on row 8 (0-based; 9 in excel) but have to specify it as 6. You can also remove that "Note 1" cell to change things.

def test_row_issue():
    reader = read_excel("...TestFastExcelRead.xlsx")
    ws = reader.load_sheet("Sheet1", header_row=6)
    df = ws.to_pandas()

@PrettyWood
Copy link
Member

I'll try to dig into it this weekend

@lukapeschke
Copy link
Collaborator

seem related to #209

@PrettyWood PrettyWood added this to the v0.11.0 milestone Jul 1, 2024
@PrettyWood PrettyWood modified the milestones: v0.11.0, v0.12.0 Jul 19, 2024
@PrettyWood
Copy link
Member

PrettyWood commented Jul 19, 2024

see #209 (comment)

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

3 participants