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 Sheet getitem slightly wrong on missing bound #1098

Open
gdementen opened this issue Feb 26, 2024 · 0 comments
Open

Excel Sheet getitem slightly wrong on missing bound #1098

gdementen opened this issue Feb 26, 2024 · 0 comments

Comments

@gdementen
Copy link
Contributor

gdementen commented Feb 26, 2024

We transform the missing bound to the current size of the sheet, instead of selecting the entire row/column "the Excel way" (as if clicking the row/column "select all" button). In most cases, this is equivalent but in some situations (at least to insert new rows/columns, it is not). However, I vaguely remember I did this on purpose. I think it was simply that full row/column selection was not supported back then when I implemented this, but maybe there was some other negative consequence of using full rows. In any case, even though implementing the change itself should be quick & simple, this will have to be tested thoroughly on existing code (not only our test suite) to check it does not break anything.

#  Using this yields a strange result (shift cells but not line heights)
# rng = sheet[dst_row_num:dst_row_num + num_rows].xw_range
rng = sheet.xw_sheet[dst_row_num:dst_row_num + num_rows, :]
rng.insert(shift='down', copy_origin='format_from_left_or_above')

See also #1097 for the insert workaround.

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

No branches or pull requests

1 participant