#写入单元格
from pyexcelerate import Workbook
wb = Workbook()
ws = wb.new_sheet("sheet name")
ws[1][1].value =15
#合并单元格
from pyexcelerate import Workbook
wb = Workbook()
ws = wb.new_sheet("sheet name")
ws[1][1].value =15
ws.range("A1", "B1").merge()
wb.save("output.xlsx")
#设置单元格格式
from pyexcelerate import Workbook, Color, Style, Font, Fill, Formatfrom datetime import datetime
wb = Workbook()
ws = wb.new_sheet("sheet name")
ws.set_cell_value(1, 1, 1)
ws.set_cell_style(1, 1, Style(font=Font(bold=True)))
ws.set_cell_style(1, 1, Style(font=Font(italic=True)))
ws.set_cell_style(1, 1, Style(font=Font(underline=True)))
ws.set_cell_style(1, 1, Style(font=Font(strikethrough=True)))
ws.set_cell_style(1, 1, Style(fill=Fill(background=Color(255,0,0,0))))
ws.set_cell_value(1, 2, datetime.now())
ws.set_cell_style(1, 1, Style(format=Format(