功能trunc(带时区的时间戳)不存在

时间:2020-10-28 03:49:32

标签: postgresql

from win32com.client import Dispatch
import os

dirpath = os.path.dirname(os.path.realpath(__file__))
outputfile = 'ExcelTest.xlsx'
excel = Dispatch("Excel.Application")

wb = excel.Workbooks.Add()
ws = wb.Worksheets('Sheet1')
ws.Name = 'Test'

ws.Cells(1, 1).Value = 'Hi'
rng = ws.Range(ws.Cells(1, 1), ws.Cells(1, 1))
cmt = rng.AddComment('Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum')
cmt.Shape.TextFrame.Characters().Font.Bold = False
cmt.ShapeRange.ScaleWidth = 3.0
cmt.ShapeRange.ScaleHeight = 3.0

wb.SaveAs(os.path.join(dirpath, outputfile))
excel.Application.Quit()

0 个答案:

没有答案
相关问题