Reading and writing the "DocumentFormat.OpenXml.Spreadsheet.CommentText" in Docu

Home Forums SpreadsheetML Reading and writing the "DocumentFormat.OpenXml.Spreadsheet.CommentText" in Docu

This topic contains 0 replies, has 1 voice, and was last updated by  Madhusudhan Reddy Kaitha 1 month, 2 weeks ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #4335

    Hi,
    Currently we are unable to set the commenttext for the Spreadsheet.Comment.
    Please find the below method as reference and let me know your comments on this.
    let me replay back if your not understanding the exact problem we are facing.
    /*
    private List<string> GetCellReferencesFromComment(string commentValue)
    {
    List<string> pCellReference = new List<string>();
    foreach (Spreadsheet.Comment comment in mWorksheetPart.WorksheetCommentsPart.Comments.CommentList)
    {
    foreach (Spreadsheet.XstringType commentText in comment.CommentText.Descendants<Spreadsheet.XstringType>())
    {
    if (string.Compare(comment.InnerText, commentValue, true) == 0)
    {
    pCellReference.Add(comment.Reference);
    }
    }
    }
    return pCellReference;
    }
    */
    I have methos like the above.I’m trying to get the innertext using my string value which it was taken from my cell.id while exporting/saving the mSpreadDocument.WorkbookPart.Workbook.Save();

    So the problem is,
    while reopening the workbook, we are unable to find the innertext for the comment value in above method.

    Currently we are using two third party tools,
    Farpoint control and OpenXml .
    we are setting the FpSpread.cell.controlcell.Note = “some id which i have it with my farpointcell”;
    The openxmlcomment.innertext taking this controlcell.note as Spreadsheet.Comment comment.InnerText
    But while reading the cell from openxml spreadsheet, we not getting the comment.InnerText what we have assinged through the farpoint controlcell.note.

    Please let you analyze and let me replay back if your not understanding the exact problem we are facing.

    Thanks,Madhu
    madhusudhan.kaitha@aveva.com

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.