I'm trying to add comments to cells in an Excel 2007 spreadsheet. I'm using the OpenXml SDK 2.0 to do so.
My use case is, I am editing Excel file and adding comments as my starting point,
Problem is that when I add Comment to the Comments part the spreadsheet doesn't load and Excel asks if I want to recover. Comments I added programmatically are not showing.
here is my code
WorksheetCommentsPart commentsPart = worksheetpart.AddNewPart<WorksheetCommentsPart>();
ssXML.Comments comments1 = new ssXML.Comments();
ssXML.Authors authors1 = new ssXML.Authors();
ssXML.Author author1 = new ssXML.Author();
author1.Text = "Author";