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 1 reply, has 2 voices, and was last updated by  JulOz 5 years, 1 month ago.

Viewing 2 posts - 1 through 2 (of 2 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

    #7839

    JulOz
    Participant

    Howdy, fellas! TOdays topic is how to cite in MLA style https://justbuyessay.com/blog/how-to-cite-in-mla. Dedicate 2 hours at least!

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.