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

Should total_height ignore offset due to header rows? #312

Open
bzm3r opened this issue Oct 29, 2024 · 1 comment
Open

Should total_height ignore offset due to header rows? #312

bzm3r opened this issue Oct 29, 2024 · 1 comment
Labels
discussion question Further information is requested

Comments

@bzm3r
Copy link

bzm3r commented Oct 29, 2024

Suppose I want to get the total height of a sheet, including header rows. Currently, the only way to do this is to load_sheet with header_row=None and then to get the total_height, because total_height currently is sensitive to the number of header rows:

let total_height = self.data().height() - self.header.offset();

Should total_height also include the number of header rows (i.e. be insensitive to the number of header rows)?

@lukapeschke lukapeschke added question Further information is requested discussion labels Oct 31, 2024
@lukapeschke
Copy link
Collaborator

I agreee that the name is confusing, but we cannot break existing behaviour. What we could do is deprecating the current height, width, total_width and offest properties on the ExcelSheet and ExcelTable types, and introduce a new property which would contain all the shape-related information, including:

  • offset
  • limit
  • data_height , the height of the selected data
  • width
  • total_height_raw , the height of the entire sheet (what you want)
  • total_data_height, the height of the entire data, i.e. total height - header offset (the current total_height proprety).

Naming is not one of my strengths, so I'm open for suggestions on this :)

@PrettyWood what are your thoughts on this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants