We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Comment.Text is sometimes falsely empty

Please see the enclosed Visual Studio Solution and the Excel File comment.xlsx.

The code is very simple:

ExcelEngine excelEngine = new ExcelEngine();

IWorkbook workbook = excelEngine.Excel.Workbooks.OpenReadOnly(@"comment.xlsx");

foreach (ICommentShape comment in workbook.ActiveSheet.Comments)
{
        IRange range = workbook.ActiveSheet.Range[comment.Row, comment.Column];
        Console.WriteLine($"Cell {range.AddressLocal} - actual comment: {comment.Text} - expected: {range.Number}");               
}

It loops through the comments in the worksheet and writes them out to the console.
There is however a bug here: the last comment (cell A5) is empty - yet the Excel comment.xlsx does have a comment here...

Attachment: ExcelTest_22ad53cb.zip

1 Reply

PK Prakash Kumar D Syncfusion Team November 26, 2018 06:45 AM UTC

Hi Samuel, 
 
Thank you for contacting Syncfusion support. 
 
We can reproduce the issue and have logged a defect report regarding this. The fix for this issue will be included in our 2018 volume 4 Service pack 1 release which will be rolled out at the end of January 2019 tentatively. 
 
Regards, 
Prakash Kumar 


Loader.
Live Chat Icon For mobile
Up arrow icon