You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Calling Worksheet.get_values() with combine_merged_cells=True and a range name not starting at column A or row 1 ("B:C" for example) produces incorrect results when expanding the merged cells content.
To Reproduce
Create a worksheet with cells B1 and B2 merged and some other content on C1 and C2.
For example:
A
B
C
foo
dummy 1
dummy 2
A call to ws.get_values("B:C", combine_merged_cells=True) outputs:
["foo", "dummy 1"]
["", "dummy 1"] => no "foo" and "dummy 1" instead of "dummy 2"
Expected behavior
The content of B1 is expanded and available on both rows:
["foo", "dummy 1"]
["foo", "dummy 2"]
Environment info:
Operating System: Linux,
Python version: 3.11
gspread version: 5.11.3
Additional context
The issue is that the combined_merge_values() function does not take into account the requested cell range to offset the value expansion.
The text was updated successfully, but these errors were encountered:
Hi! Thanks for the report. This is a pretty glaringly wrong problem with combine_merged_cells. Adding this feature (which I did...) has caused a lot of pain, haha.
Perhaps we should have released the feature as experimental. Anyway, I have made a branch with a failing test.
If this test passes, then the bug is fixed. I will attempt the fix when I get time. If you would like to give it a go, please do.
Describe the bug
Calling
Worksheet.get_values()
withcombine_merged_cells=True
and a range name not starting at column A or row 1 ("B:C" for example) produces incorrect results when expanding the merged cells content.To Reproduce
Create a worksheet with cells B1 and B2 merged and some other content on C1 and C2.
For example:
A call to
ws.get_values("B:C", combine_merged_cells=True)
outputs:Expected behavior
The content of B1 is expanded and available on both rows:
Environment info:
Additional context
The issue is that the
combined_merge_values()
function does not take into account the requested cell range to offset the value expansion.The text was updated successfully, but these errors were encountered: