The Comment Tag

During transformation, Excel Comments may be created by using the "comment" tag. This tag must be used in the bodiless form. When processed, the "comment" tag creates a new Excel Comment on the Cell.

In the internal Apache POI library's API, the method "createDrawingPatriarch" is called in order to create the Comment. On older Excel spreadsheets (.xls, versions 97-2003), this appears to corrupt other existing drawings such as shapes and charts. However, on newer Excel spreadsheets (.xlsx, versions 2007+), this leaves existing drawings such as shapes and charts intact.


  • The "comment" tag supports all base tag attributes.
  • value: RichTextString Required. This becomes the contents of the actual Cell to which the Excel Comment is attached. Rich Text String formatting is respected.
  • author: String Required. This is the "author" portion of the Excel Comment.
  • comment: RichTextString Required. This is the contents of the Excel Comment. Rich Text String formatting is respected.
  • visible: boolean Optional. This determines whether the Excel Comment will be initially visible. If false, then the viewer must mouse-over the Cell to view the Comment. The default is false.


In this example, Bugs Bunny comments on Elmer Fudd's line. Notice how Rich Text String formatting is preserved for both the Cell contents and the Comment contents.

Here is the template spreadsheet:

Comment Template

... gets transformed into...

Comment Result

When the viewer places the mouse over the Cell, the Comment pops up.

Comment Mouseover