Python xlwings range.api
import xlwings as xw
app=xw.App(add_book=False)
wb = app.books.add()
wb.sheets.add(name='hello_friend')
sht = wb.sheets['hello_friend']
sht.range("A1").value = 1
sht.range("A1").api.Font.Size = 15
sht.range("A1").api.Font.Name = "微软雅黑"
sht.range("A1").api.Font.Bold = True
sht.range("A1").api.Font.Color = 0x0000FF
sht.range("A1:c3").api.Borders(9).LineStyle = 1
sht.range("A1:C3").api.Borders(9).Weight = 3
sht.range("A1:C3").api.Borders(10).LineStyle = 1
sht.range("A1:C3").api.Borders(10).Weight = 3
sht.range("A1:C3").api.Borders(11).LineStyle = 1
sht.range("A1:C3").api.Borders(11).Weight = 2
sht.range("A1:C3").api.Borders(12).LineStyle = 1
sht.range("A1:C3").api.Borders(12).Weight = 2
sht.range("A1:C3").api.HorizontalAlignment = -4108
sht.range("A1:C3").api.VerticalAlignment = -4108
sht.range("B1").value = 2
sht.range("C1").formula = "=SUM(A1:B1)"
sht.range("A1:c3").columns.autofit()
sht.range("A1").color = [0, 0, 255]
print(sht.range("A1").value)
print(sht.range("A1").color)
print(sht.range("C1").formula_array)
sht.range('A2').value = [['hello 1', 'hello 2', 'hello 3'], [1.0, 2.0, 3.0]]
sht.range("A1:b1").api.Merge()
print(sht.range("A1").merge_area)
print(sht.range("A4:C4").merge_cells)
sht.range("A1:B1").api.UnMerge()