Thank you for posting and we are glad to help with you.
After reading your post, I felt that I am not very clear about your problem. What's the type of your project? What's the version of your Office? It will be better if you can show us more detailed code snippet.
I'm using Shared Add-In project and Office 2007. To reproduce the problem I've created a sample project. You can download it here:
http://panza.org.ua/XMLProblem.zip. It includes excel file XMLProblem.xlsx. To reproduce the problem click on the cell with comment and click on the ribbon button XMLProblem. The code behind the button is:
var app = ((Application) applicationObject);
app.ActiveCell.Value[XlRangeValueDataType.xlRangeValueXMLSpreadsheet] = app.ActiveCell.Value[XlRangeValueDataType.xlRangeValueXMLSpreadsheet];
So if I just assign the active cell the same XML it had, the comments loose some formatting.
Another problem which I found is that color formatting for cell contents is "lost". For example - in the same file, the cell contents of cell E10 have color #8B0000 (R: 139 G: 0 B: 0). After clicking the XMLProblem button (when the cell is selected), the
color resets to #800000 (R: 128 G: 0 B: 0), which is one of Standard colors.
The link you provided doesn't help, as they don't work with comments as formatted text, but as a plain text. I need to retrieve and set comments as formatted text.