Reading cell comments - why is this in every comment?

I am using Aspose.Cells to read data from Excel spreadsheets and I need to pull the comment if there are any on a cell.

When I get the comment using something like:

worbook.Worksheets[0].Cells[r,c].Comment.Note

The comment always is returned as:

"[Threaded comment]\n\nYour version of Excel allows you to read this threaded comment; however, any edits to it will get removed if the file is opened in a newer version of Excel. Learn more: https://go.microsoft.com/fwlink/?linkid=870924\n\nComment:\n B11 comment in blank sheet"

So should I assume that I need to parse this? Is it safe to look for “\n\nComment:\n” and get whatever is after it?

Why is Excel putting that in every comment (I assume it is Excel). I’m using the latest version of Excel from Microsoft 365 and it’s a new file I created.

@jdenable
We have created a sample file containing notes and comments. You can refer to the following sample code to read notes and comments. Please refer to the attachment. sample.zip (8.1 KB)

The sample code as follows:

Workbook wb = new Workbook(filePath + "sample.xlsx");
Worksheet sheet = wb.Worksheets[0];

CommentCollection comments = sheet.Comments;
foreach (Comment comment in comments)
{
    if (comment.IsThreadedComment)
    {
        //read threaded comments
        ThreadedCommentCollection threadedComments = comment.ThreadedComments;
        foreach (ThreadedComment threadedComment in threadedComments)
        {
            Console.WriteLine("Comment: " + threadedComment.Notes);
            Console.WriteLine("Author: " + threadedComment.Author.Name);
        }
    }
    else
    {
        //read notes
        Console.WriteLine(comment.Note);
    }
}

The output:

test note

Comment: Test comment
Author: 365 aspose

For the reading, writing, and editing operations of threaded comments, please refer to the following documentation.

If you still have any questions, please provide your sample file and test code, and we will check it soon.

Thanks for your reply.

My code is reading a file created in Excel:

Open Excel
Choose template “Blank workbook”
Click in cell A1
Right-click in A1 and choose “New Comment”
Enter “Line 1” and Ctrl-Enter.
Click out into another cell
Save As

Then I run this code:

Console.WriteLine("Version: " + CellsHelper.GetVersion());
var workbook = new Aspose.Cells.Workbook("c:\\temp\\blank_threaded.xlsx");
CommentCollection comments = workbook.Worksheets[0].Comments;
Console.WriteLine("Comment: " + comments[0].Note);

The output is:

Version: 24.3
Comment: [Threaded comment]

Your version of Excel allows you to read this threaded comment; however, any edits to it will get removed if the file is opened in a newer version of Excel. Learn more: https://go.microsoft.com/fwlink/?linkid=870924

Comment:
    Line 1

I think Excel is adding that initial comment every time.

@jdenable
In Excel 365 ,
Right-click in A1 and choose “New Comment”, the created comment is Threaded Comment in Aspose.Cells.

Right-click in A1 and choose "Note”, the created note is Comment in Aspose.Cells.

Threaded Comment is a new feature in Office 365 and extends from the old Note.