summaryrefslogtreecommitdiffstats
path: root/dcoppython/test/test4.py
blob: b87a071f3c14f0214cd46dd608c89b085f75c70c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

import pcop
import pydcop

app = pydcop.anyAppCalled("kspread")

doc = app.default.getDocuments()[0]

table = doc.map().tables()[0]

table.cell( 1, 1 ).setValue( 1 )

x = 2

while x < 5:
	y = 2
	while y < 5:
		previousCell = table.cell( x - 1, y - 1 )
		cell = table.cell( x, y )
		cell.setValue( previousCell.value() + 1.0 )		
		y = y + 1
	x = x + 1