recipe xlsx an comments

  • Hi
    I am trying to insert comments in an Excel sheet.
    I analysed a file and found that the comments are in two files:
    I can add the XML code and the files seems to be ok. But Excel wont show the comment. It removes it automatically in xl/comments1.xml.
    Further I found that a comment has an attribute shapeId.

    <comment ref="A1" authorId="0" shapeId="0" xr:uid="{AD9B68F3-9264-4B43-BE6B-2456B4FCB508}">

    The shapeId references a shape in the file xl/drawings/vmlDrawing1.vml. This file is not XML. So I cannot manipulate it with the helpers.
    Or is there a way to manipulate this file?
    Or am I doing something completely wrong and there is another possibility?
    I'm afraid you say I have to program my own helper :-)

    Many thanks

  • I've done it. It's a little bit complicated, though. So I'd be happy to explain it in detail here, but only if anyone's interested.

    In a nutshell:
    I simply generated the whole vml. This thread helped me:

    Then I had to feed the files xl/comments1.xml, xl/persons/person.xml and xl/threadedComments/threadedComment1.xml with appropriate data.

Log in to reply

Looks like your connection to jsreport forum was lost, please wait while we try to reconnect.