You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
354 B
25 lines
354 B
15 years ago
|
|
||
|
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
|
||
|
|
||
|
|