OpenOffice-OODoc - Re: OODOC does not seem to work what do i do wrong

Posted on Sat Jun 16 13:29:34 2007 by jmgdoc in response to 5446 (See the whole thread of 2)
Re: OODOC does not seem to work what do i do wrong

Beware, a spreadsheet tab should be normalized before any cell operation. Knowing that the ODS format allows storage denormalization (i.e. more than one table cell can be stored in a single XML element), the result of a direct cell adressing operation (like "Sheet1", "D1") is unpredictable as long as the target area has not been pre-processed through getTable or normalizeSheet.

Note that this pre-processing is required once, and not before each cell access.

The following code should work better (the given size for getTable is an example; one should provide the size of a 0,0-based area which covers all the cells that will be addressed.
See getTable and normalizeSheet in the OpenOffice::OODoc::Text manual for details about the spreadsheet addressing logic.
my $doc = ooDocument(file => "$path_to_files\\verschillenstaatsjabloon.ods"); my $sheet = $doc->getTable("Sheet1", 10, 10); my $testt = $doc->cellValue($sheet,"D1"); #...
Write a response