I'm trying to update a libreoffice spreadsheet (test.ods) with perl's module OpenOffice::OODoc, and I am coming across spurious behaviour which I'm not sure if it's from my poor understanding, a bug in OpenOffice::OODoc or simply an artifact with libreoffice. Here's the test code:

use OpenOffice::OODoc; my $document=odfDocument(file=>'test.ods'); foreach my $rr (0..10){ $document->updateCell("Sheet1",$rr,0,$rr."0"); } $document->save;

The code is simply meant to place into column A for the first 10 rows, the row number followed by a '0' (i.e., '00', '10', '20'...)

Before this code is ran, test.ods was blank except for the number 999 placed in cells "C1", "B2 and "F3". The cell "A5" was selected. So roughly, it looked like:
   
      999         
999
999
 
 

After the perl code was ran, the spreadsheet looked like:
0000999
10999
2020202020999
303030303030
404040404040

It seems like the line $document->updateCell(...); does not update just one cell, but rather all cells on that line, starting at the specified column and ending at either the first non-black cell or end of spreadsheet's extent in columns. Also, it only does this to up to row 5, where the cell is selected, presumably to the spreadsheet's extent in rows.

Would somebody please explain what I am doing wrong?
-perl version: 5.16.3
-OpenOffice::OODoc version: 2.125
-libreoffice version: 4.1.6.2


In reply to Weird behaviour with libreoffice spreadsheet and OpenOffice::OODoc by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.