Esempio n. 1
0
#!/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
Esempio n. 2
0
#!/usr/bin/env python
# -*- coding: windows-1251 -*-
# Copyright (C) 2005 Kiseliov Roman

from poi import Workbook, Borders, Format, Font

wb = Workbook()
ws0 = wb.sheets.add('sheet0')

fnt1 = Font()
fnt1.Fontname = 'Verdana'
fnt1.Bold = True
fnt1.Height = 18

brd1 = Borders()
brd1.Left = 0x06
brd1.Right = 0x06
brd1.Top = 0x06
brd1.Bottom = 0x06

fnt2 = Font()
fnt2.Fontname = 'Verdana'
fnt2.Bold = True
fnt2.Height = 14

brd2 = Borders()
brd2.Left = 0x01
brd2.Right = 0x01
brd2.Top = 0x01
brd2.Bottom = 0x01