Skip Menu |

This queue is for tickets about the OpenOffice-OODoc CPAN distribution.

Report information
The Basics
Id: 39670
Status: resolved
Priority: 0/
Queue: OpenOffice-OODoc

People
Owner: Nobody in particular
Requestors: ando [...] sys.eng.shizuoka.ac.jp
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Bug in getCelValue?
Date: Mon, 29 Sep 2008 13:41:56 +0900
To: bug-OpenOffice-OODoc [...] rt.cpan.org
From: Kazutoshi Ando <ando [...] sys.eng.shizuoka.ac.jp>
Suppose that file Book.ods has the following sheet | A | B | C | D | E | F | -+-----+-----+-----+-----+-----+-----+ 1|1 |1 |1 |2 |2 |3 | -+-----+-----+-----+-----+-----+-----+ as the first sheet. Then, the output of the following code ----------------------------- #!/usr/bin/perl # use OpenOffice::OODoc 2.103; my $oofile = odfContainer("Book.ods"); my $doctext = ooText(container=>$oofile); for($i=0;$i<6;$i++) { printf("%s,",$doctext->getCellValue(0,0,$i)); } ----------------------------- should be "1, 1, 1, 2, 2 3, ". But it is actually, "1, 2, 3, , , , ". I found that this module OpenOffice::OODoc is very useful, so I hope this bug will be fixed soon (if this is really a bug).
Le Lun. Sep. 29 00:42:34 2008, ando@sys.eng.shizuoka.ac.jp a écrit : Show quoted text
> Suppose that file Book.ods has the following sheet > | A | B | C | D | E | F | > -+-----+-----+-----+-----+-----+-----+ > 1|1 |1 |1 |2 |2 |3 | > -+-----+-----+-----+-----+-----+-----+ > as the first sheet. Then, the output of the following code > ----------------------------- > #!/usr/bin/perl > # > > use OpenOffice::OODoc 2.103; > > my $oofile = odfContainer("Book.ods"); > my $doctext = ooText(container=>$oofile); > > for($i=0;$i<6;$i++) { > printf("%s,",$doctext->getCellValue(0,0,$i)); > } > ----------------------------- > > should be "1, 1, 1, 2, 2 3, ". But it is actually, > "1, 2, 3, , , , ". > > I found that this module OpenOffice::OODoc is very useful, so I hope > this bug will be fixed soon (if this is really a bug).
It's not a bug. This script performs direct cell addressing in a spreadsheet which has not been "normalized". The following code should work (odfDocument replaces ooText which is deprecated, but equivalent; the important instruction is getTable with the "normalize" argument; see normalizeTable in the OpenOffice::OODoc::Text manual page for explanations) #!/usr/bin/perl # use OpenOffice::OODoc 2.103; my $oofile = odfContainer("Book.ods"); my $doctext = odfDocument(container=>$oofile); my $t = $doctext->getTable(0, 'normalize'); for($i=0;$i<6;$i++) { printf("%s,",$doctext->getCellValue($t,0,$i)); }