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

Issue with cell range not being set correctly with write_array_formula() #735

Closed
jmcnamara opened this issue Aug 3, 2020 · 1 comment
Closed
Assignees
Labels
bug short term Will be added.

Comments

@jmcnamara
Copy link
Owner

Issue reported on StackOverflow.

The following doesn't write the array formula in cell B1 of Sheet2. This is due to a bug in the range calculation. The bug is hidden in Sheet1 due to other cells setting the range.

import xlsxwriter

workbook = xlsxwriter.Workbook('test.xlsx')

sheet1 = workbook.add_worksheet('Sheet1')
sheet2 = workbook.add_worksheet('Sheet2')

sheet1.write('A1', 'Foo')
sheet1.write('A2', 'Bar')

sheet1.write_array_formula('B1:B2', '{=Sheet1!$A$1:$A$2}')
sheet2.write_array_formula('B1:B2', '{=Sheet1!$A$1:$A$2}')

workbook.close()
@jmcnamara jmcnamara self-assigned this Aug 3, 2020
@jmcnamara jmcnamara added bug short term Will be added. labels Aug 3, 2020
jmcnamara added a commit that referenced this issue Aug 3, 2020
@jmcnamara
Copy link
Owner Author

Fixed in XlsxWriter version 1.3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug short term Will be added.
Projects
None yet
Development

No branches or pull requests

1 participant