Beispiel #1
0
#!/usr/bin/env python
# tries stress SST, SAT and MSAT

import sys
from time import *
from poi import Workbook

#style = XFStyle()

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

colcount = 200 + 1
rowcount = 6000 + 1

t0 = time()
print "\nstart: %s" % ctime(t0)

print "Filling..."
for col in xrange(colcount):
    print "[%d]" % col,
    sys.stdout.flush()
    for row in xrange(rowcount):
        #ws0.write(row, col, "BIG(%d, %d)" % (row, col))
        ws0.cells(row, col).Value = "BIG"

t1 = time() - t0
print "\nsince starting elapsed %.2f s" % (t1)

print "Storing..."
wb.save('big-16Mb.xls')
Beispiel #2
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
Beispiel #3
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
Beispiel #4
0
#!/usr/bin/env python
# tries stress SST, SAT and MSAT

import sys
from time import *
from poi import Workbook

#style = XFStyle()

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

colcount = 200 + 1
rowcount = 6000 + 1

t0 = time()
print "\nstart: %s" % ctime(t0)

print "Filling..."
for col in xrange(colcount):
    print "[%d]" % col,
    sys.stdout.flush() 
    for row in xrange(rowcount):
        #ws0.write(row, col, "BIG(%d, %d)" % (row, col))
        ws0.cells(row,col).Value = "BIG"

t1 = time() - t0
print "\nsince starting elapsed %.2f s" % (t1)

print "Storing..."
wb.save('big-16Mb.xls')
Beispiel #5
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
Beispiel #6
0
            sys.stderr.write(l+'\n')
            wb=Workbook(path+l)
            for ws in wb.sheets:
                dump_sheet(ws,wb.sheets[ws])
            wb.save('test.xls')
            wb=Workbook('test.xls')
            for ws in wb.sheets:
                dump_sheet(ws,wb.sheets[ws])
        except int, e:
            print e

exit(0)
'''
                        
#wb=Workbook('/home/user/workspace/Queck/mso/poi-3.8/test-data/spreadsheet/StringContinueRecords.xls')
wb=Workbook('test.xls')
print wb.date1904
for ws in wb.sheets:
    dump_sheet(ws,wb.sheets[ws])
wb.save('test2.xls')
wb=Workbook('test2.xls')
dump_supbooks(wb)
#for ws in wb.sheets:
#    dump_sheet(ws,wb.sheets[ws])
exit(0)





    
Beispiel #7
0
#!/usr/bin/env python
# tries stress SST, SAT and MSAT

from time import *
from poi import Workbook

#style = XFStyle()

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

colcount = 200 + 1
rowcount = 6000 + 1

t0 = time()

for col in xrange(colcount):
    for row in xrange(rowcount):
        ws0.cells(row, col).Value="BIG(%d, %d)" % (row, col)

t1 = time() - t0
print "\nsince starting elapsed %.2f s" % (t1)

print "Storing..."
wb.save('big-35Mb.xls')

t2 = time() - t0
print "since starting elapsed %.2f s" % (t2)


Beispiel #8
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
Beispiel #9
0
#!/usr/bin/env python
# -*- coding: windows-1251 -*-
# Copyright (C) 2005 Kiseliov Roman
from poi import Workbook

w = Workbook()
ws = w.sheets.add("F")

ws.cells(0, 0).Formula = "-(1+1)"
ws.cells(1, 0).Formula = "-(1+1)/(-2-2)"
ws.cells(2, 0).Formula = "-(134.8780789+1)"
ws.cells(3, 0).Formula = "-(134.8780789e-10+1)"
ws.cells(4, 0).Formula = "-1/(1+1)+9344"

ws.cells(0, 1).Formula = "-(1+1)"
ws.cells(1, 1).Formula = "-(1+1)/(-2-2)"
ws.cells(2, 1).Formula = "-(134.8780789+1)"
ws.cells(3, 1).Formula = "-(134.8780789e-10+1)"
ws.cells(4, 1).Formula = "-1/(1+1)+9344"

ws.cells(0, 2).Formula = "A1*$B1"
ws.cells(1, 2).Formula = "A2*B$2"
ws.cells(2, 2).Formula = "A3*$B$3"
ws.cells(3, 2).Formula = "A4*B4*sin(pi()/4)"
ws.cells(4, 2).Formula = "A5%*B5*pi()/1000"

##############
## NOTE: parameters are separated by semicolon!!!
##############

Beispiel #10
0
#!/usr/bin/env python
# -*- coding: windows-1251 -*-
# Copyright (C) 2005 Kiseliov Roman
from poi import Workbook

w = Workbook()
ws = w.sheets.add('F')

ws.cells(0, 0).Formula = "-(1+1)"
ws.cells(1, 0).Formula = "-(1+1)/(-2-2)"
ws.cells(2, 0).Formula = "-(134.8780789+1)"
ws.cells(3, 0).Formula = "-(134.8780789e-10+1)"
ws.cells(4, 0).Formula = "-1/(1+1)+9344"

ws.cells(0, 1).Formula = "-(1+1)"
ws.cells(1, 1).Formula = "-(1+1)/(-2-2)"
ws.cells(2, 1).Formula = "-(134.8780789+1)"
ws.cells(3, 1).Formula = "-(134.8780789e-10+1)"
ws.cells(4, 1).Formula = "-1/(1+1)+9344"

ws.cells(0, 2).Formula = "A1*$B1"
ws.cells(1, 2).Formula = "A2*B$2"
ws.cells(2, 2).Formula = "A3*$B$3"
ws.cells(3, 2).Formula = "A4*B4*sin(pi()/4)"
ws.cells(4, 2).Formula = "A5%*B5*pi()/1000"

##############
## NOTE: parameters are separated by semicolon!!!
##############

ws.cells(