table[0]: rows[28], cols[5]
Nr Staffel Episode Titel archiviert
1 Ganz normale Jobs 1 undef undef
2 1 2 Spuren 1
3 1 3 Nicht über mein Sofa 1
4 1 4 Geschmackssache 1
5 2 1 Über den Wolken 1
6 2 Die Challenge 1 undef
7 2 3 Schottys Kampf 1
8 2 4 Angehörige 1
9 2 5 Auftrag aus dem Jenseits 1
10 3 1 Fleischfresser 1
11 3 2 Schweine 1
12 3 Carpe Diem 1 undef
13 3 4 Ja, ich will 1
14 4 1 Wattolümpiade 1
15 4 2 Der Putzer 1
16 4 3 Damit muss man rechnen 1
17 4 Der Fluch 1 undef
18 4 5 Tauschgeschäfte 1
19 5 1 Bestattungsvorsorge 1
20 5 2 Das freie Wochenende 1
21 5 3 Pfirsichmelba 1
22 5 4 Anbieterwechsel 1
23 5 E.M.M.A. 206 1 undef
24 5 6 Freunde 1
25 6 1 Sind Sie sicher? 1
26 6 2 Özgür 1
27 6 3 Schluss mit lustig 1
--------------------------------------------------------------------------------
table[1]: rows[21], cols[5]
Nr Staffel Episode Titel archiviert
1 Das Krokodil-Dilemma 1 undef undef
2 1 2 Der Hahnenprinz 1
3 1 3 Die schmutzige Straße 1
4 1 4 Die verschluckte Schuld 1
5 1 5 Die Fünf Sinne und der Geist 0
6 1 6 Buridans Esel 1
7 1 7 Wer rasiert den Barbier? 0
8 1 8 Der Haufen 1
9 1 9 Ein Fuchs, ein Kaninchen und ein Kohlkopf 1
10 1 10 Mortons Gabel 1
11 2 1 Warten auf Dutch 0
12 2 Vor dem Gesetz 0 undef
13 2 3 Der Mythos des Sisyphos 0
14 2 4 Furcht und Zittern 0
15 2 5 Das Geschenk der Weisen 0
16 2 6 Rhinocerus 0
17 2 7 Haben Sie das gemacht? Nein, Sie! 0
18 2 8 Loplop 0
19 2 9 Das Schloss 0
20 2 10 Palindrom 0
--------------------------------------------------------------------------------
table[2]: rows[11], cols[5]
Nr Staffel Episode Titel archiviert
1 Test undef undef undef
2 Test undef undef undef
3 Test undef undef undef
4 Test undef undef undef
5 Test undef undef undef
6 Test undef undef undef
7 Test undef undef undef
8 Test undef undef undef
9 Test undef undef undef
10 Test undef undef undef
--------------------------------------------------------------------------------
#!/usr/bin/perl -w
use strict;
use v5.10;
use OpenOffice::OODoc;
my $doc = odfDocument(file => './data/data.ods');
my $tables = $doc->getTableList();
for (my $tableNum = 0; $tableNum < $tables; $tableNum++) {
my ($rows, $cols) = $doc->getTableSize($tableNum);
say "table[" . $tableNum . "]: rows[" . $rows . "], cols[" . $cols . "]";
for (my $rowNum = 0; $rowNum < $rows; $rowNum++) {
for (my $colNum = 0; $colNum < $cols; $colNum++) {
my $value = $doc->getCellValue($tableNum, $rowNum, $colNum);
if ($colNum > 0) {
print "\t";
}
if (defined $value) {
print $value;
} else {
print "undef";
}
}
print "\n";
}
print "--------------------------------------------------------------------------------\n";
}
user@sidbox:~$ ~/bin/oo_table
table[0]: rows[3], cols[5]
1 2 4 5
6 7 9 undef
a b c d e
-------------------------------------------------