I created a small xlsx file with Excel 2013
yellow cells have data validation which refer to a list [1,2,3] White cells have no validation
here is my code:
from openpyxl import load_workbook workbook = load_workbook("test.xlsx") worksheet = workbook.active worksheet['A1'] = 1 workbook.save(filename="test.xlsx")
I expect A1 is set to 1, A3 is still blank, and A2 and A4 have no validation drop down.
But the actual is:
You can see A2 now have validation drop down, (which refer to a list [1,2,3])
I tried more and found all cells except last cell (A2, A3, A4, ... Ax-1) was set data validation.