I have a very long comment in an Excel cell.
I need to able to read this comment.
Microsoft.Office.Interop.Excel.Comment comment = ws.get_Range(ws.Cells[1, Constants.HIDDEN_DATA_COL], ws.Cells[1, Constants.HIDDEN_DATA_COL]).Comment;
if(comment!=null)
{
Microsoft.Office.Interop.Excel.Characters chars = comment.Shape.TextFrame.Characters(System.Type.Missing, System.Type.Missing);
string theText = chars.Text;
MessageBox.Show(theText); //**truncated!**
}
I read that getting loading the characters need to be looped but how should I wonder how should I do it if I don't know the length of the character?
After trial and error, solved by implementing this :