'xlwings or VBA works on Windows 10 but not mac (Python)
I have the following part of code that breaks:
for sheet in all_sheet_names:
if sheet.name != "Products":
sheet.range("A1").value = "Attribute Name"
sheet.range("B1").value = "Attribute Value"
sheet.range("D1").value = "Description (only for non existing attributes!)"
sheet.range("E1").value = "Unit (only for non existing attributes!)"
sheet.range("C1").value = "Name (only for non existing attributes!)"
for cell in list(range(2, 11)):
cell_number = "C" + str(cell)
print(cell_number)
Formula1 = "File Upload,Text,Number,Number with units, Multiple choice, Radio button, Bolean"
sheet.range(cell_number).api.Validation.Add(Type=3, Formula1=Formula1)
for cell in list(range(2, 11)):
cell_number = "E" + str(cell)
Formula1 = "mm,kPa,N,m,m2,t,C,cm,W/mK,mm/mK,dB,MN/m3,kg/m3,m2K/W,kJ"
sheet.range(cell_number).api.Validation.Add(Type=3, Formula1=Formula1)
The broken section, also seen from the screenshot is on line 43 and 47 this api.Validation.Add().
This is the link to the documentation for Validation - https://docs.microsoft.com/en-us/office/vba/api/excel.validation.add
On Windows 10 this code runs perfectly fine with no error, the problem is on mac.
Amy workarounds to this problem?

Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
