#!/usr/bin/env python # -*- coding: windows-1251 -*- # Copyright (C) 2005 Kiseliov Roman from poi import Workbook, Borders, Font, Format font0 = Font() font0.Fontname = 'Times New Roman' font0.StruckOut = True font0.Bold = True style0 = Format() style0.Font = font0 wb = Workbook() ws0 = wb.sheets.add('0') ws0.cells(1, 1).Value='Test' ws0.cells(1, 1).Format=style0 for i in range(0, 0x53): borders = Borders() borders.Left = i borders.Right = i borders.Top = i borders.Bottom = i ws0.cells(i,2).Format.Borders=borders ws0.cells(i,2).Format.Font=font0 ws0.cells(i,3).Value=hex(i) ws0.cells(i,3).Format=ws0.cells(i,2).Format
fnt3 = Font() fnt3.Fontname = 'Verdana' fnt3.Bold = True fnt3.Italic = True fnt3.Height = 12 brd3 = Borders() brd3.Left = 0x07 brd3.Right = 0x07 brd3.Top = 0x07 brd3.Bottom = 0x07 #fnt4 = Font() style1 = Format() style1.Font = fnt1 style1.Alignment = Format.CENTER style1.VertAlign = Format.VERTICAL_BOTTOM style1.FillPattern = Format.SOLID_FILL style1.ForegroundColor = 0x16 style1.Borders = brd1 style2 = Format() style2.Font = fnt2 style2.Font.Italic = True style2.Font.Underline = Font.DOUBLE_ACCOUNTING style2.Font.Shadow = True style2.Font.Weight = 0x200 style2.Alignment = Format.RIGHT style2.VertAlign = Format.VERTICAL_CENTER
#!/usr/bin/env python # -*- coding: windows-1251 -*- # Copyright (C) 2005 Kiseliov Roman from poi import Workbook, Borders, Font, Format font0 = Font() font0.Fontname = 'Times New Roman' font0.StruckOut = True font0.Bold = True style0 = Format() style0.Font = font0 wb = Workbook() ws0 = wb.sheets.add('0') ws0.cells(1, 1).Value = 'Test' ws0.cells(1, 1).Format = style0 for i in range(0, 0x53): borders = Borders() borders.Left = i borders.Right = i borders.Top = i borders.Bottom = i ws0.cells(i, 2).Format.Borders = borders ws0.cells(i, 2).Format.Font = font0 ws0.cells(i, 3).Value = hex(i) ws0.cells(i, 3).Format = ws0.cells(i, 2).Format
fnt3 = Font() fnt3.Fontname = 'Verdana' fnt3.Bold = True fnt3.Italic = True fnt3.Height = 12 brd3 = Borders() brd3.Left = 0x07 brd3.Right = 0x07 brd3.Top = 0x07 brd3.Bottom = 0x07 #fnt4 = Font() style1 = Format() style1.Font = fnt1 style1.Alignment = Format.CENTER style1.VertAlign = Format.VERTICAL_BOTTOM style1.FillPattern=Format.SOLID_FILL style1.ForegroundColor=0x16 style1.Borders = brd1 style2 = Format() style2.Font = fnt2 style2.Font.Italic=True style2.Font.Underline=Font.DOUBLE_ACCOUNTING style2.Font.Shadow=True style2.Font.Weight=0x200 style2.Alignment = Format.RIGHT style2.VertAlign = Format.VERTICAL_CENTER