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

Bug: set_row not working after set_default_row #1087

Open
1 task done
80avin opened this issue Sep 3, 2024 · 1 comment
Open
1 task done

Bug: set_row not working after set_default_row #1087

80avin opened this issue Sep 3, 2024 · 1 comment
Assignees
Labels
bug in progress The fix/feature is being worked on.

Comments

@80avin
Copy link

80avin commented Sep 3, 2024

Current behavior

The row with index (zero-based) = 0 gets set to 50 unit high.

This works if I set_row with 14,16 heights.

Expected behavior

The row with index (zero-based) = 0 should be set to 15 units high.

Sample code to reproduce

import xlsxwriter

workbook = xlsxwriter.Workbook('hello.xlsx')
worksheet = workbook.add_worksheet()

worksheet.write('A1', 'Hello world')
worksheet.set_default_row(50)
worksheet.set_row(0, 15)
# workaround:
# worksheet.set_row(0, 16)

workbook.close()

Environment

- XlsxWriter version: 3.2.0
- Python version: 3.12
- Excel version: NA
- OS: Ubuntu 24.04

Any other information

Since 15 is the default height, I think it avoids updating the sheet if I set a row height to 15.
It should verify whether set_row is called with current default, only then it may avoid.

OpenOffice and LibreOffice users

  • I have tested the output file with Excel.
@80avin 80avin added the bug label Sep 3, 2024
@jmcnamara
Copy link
Owner

The row with index (zero-based) = 0 should be set to 15 units high.

This happens, as you guessed, because the 15 is the normal default height for a row. You can work around it by setting the row height to 15.001 or similar.

Either way it is a bug. I'll look into it.

@jmcnamara jmcnamara self-assigned this Sep 3, 2024
@jmcnamara jmcnamara added the in progress The fix/feature is being worked on. label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug in progress The fix/feature is being worked on.
Projects
None yet
Development

No branches or pull requests

2 participants