As per the subject, I'd like to add a note to a spreadsheet table cell.
This syntax
my @cells = $doc->getRowCells($row);
...
$doc->setAnnotation($cells[$j], 'author' => "Sean" , 'offset' => 0, 'text' => "Note Test" );
will successfully create output like
<table:table-cell office:value-type="string">
<text:p text:style-name="Standard">
<office:annotation>
<dc:creator>Sean</dc:creator>
<dc:date>2009-04-11T23:27:12</dc:date>
<text:p text:style-name="Standard">Note Test</text:p>
</office:annotation>
Test
</text:p>
</table:table-cell>
.. which crashes openoffice 3.
The problem is that the <office:annotation> needs to be within <table:table-cell ..>
but NOT embedded within a <text:p ..> section.
This is what openoffice 3 produces:
<table:table-cell office:value-type="string">
<office:annotation draw:style-name="gr1" draw:text-style-name="P1" svg:width="2.899cm"
svg:height="0.717cm" svg:x="2.858cm" svg:y="0.001cm" draw:caption-point-x="-2.858cm" draw:caption-point-y="-0.001cm">
<dc:creator>SMC</dc:creator>
<dc:date>2009-04-11T00:00:00</dc:date>
<text:p text:style-name="P1">This is the note</text:p>
</office:annotation>
<text:p>Test Cell</text:p>
</table:table-cell>
Anyone have a snippet of working code?