Last change
on this file since 17735 was
17735,
checked in by grum, 12 years ago
|
version 3.5.4 - fix minor bug & add new functions to framework
|
-
Property svn:executable set to
*
|
File size:
980 bytes
|
Line | |
---|
1 | <?php |
---|
2 | // This example is writen in UTF-8 |
---|
3 | |
---|
4 | // Load library |
---|
5 | require_once('../ods.php'); |
---|
6 | |
---|
7 | // Create Ods object |
---|
8 | $ods = new ods(); |
---|
9 | |
---|
10 | // Create table named 'table 1' |
---|
11 | $table1 = new odsTable('table 1'); |
---|
12 | $row = new odsTableRow(); |
---|
13 | $row->addCell( new odsTableCellString("Hello") ); |
---|
14 | $row->addCell( new odsTableCellString("World") ); |
---|
15 | $table1->addRow($row); |
---|
16 | $ods->addTable($table1); |
---|
17 | |
---|
18 | // Create table named 'table 2' |
---|
19 | $table2 = new odsTable('table 2'); |
---|
20 | $row = new odsTableRow(); |
---|
21 | $row->addCell( new odsTableCellString("Rand1") ); |
---|
22 | $row->addCell( new odsTableCellString("=") ); |
---|
23 | $row->addCell( new odsTableCellString( rand() ) ); |
---|
24 | $table2->addRow($row); |
---|
25 | |
---|
26 | $row = new odsTableRow(); |
---|
27 | $row->addCell( new odsTableCellString("Rand2") ); |
---|
28 | $row->addCell( new odsTableCellString("=") ); |
---|
29 | $row->addCell( new odsTableCellString( rand() ) ); |
---|
30 | $table2->addRow($row); |
---|
31 | |
---|
32 | $ods->addTable($table2); |
---|
33 | |
---|
34 | //Select 'table 2' |
---|
35 | $ods->setDefaultTable($table2); |
---|
36 | |
---|
37 | // Download the file |
---|
38 | $ods->downloadOdsFile("multiTable.ods"); |
---|
39 | ?> |
---|
Note: See
TracBrowser
for help on using the repository browser.