EPPlus - How to remove a comment from a cell? -


in epplus can add comments cell in worksheet using worksheet.cells[x, y].addcomment()

but how remove comment given cell - there isn't worksheet.cells[i, j].removecomment() - need leave other comments in place

thanks in advance suggestions

one think simple :).

check out:

[testmethod] public void comment_test() {     var existingfile = new fileinfo(@"c:\temp\temp.xlsx");     if (existingfile.exists)         existingfile.delete();      using (var package2 = new excelpackage(existingfile))     {         var ws = package2.workbook.worksheets.add("sheet1");         ws.cells[1, 1].addcomment("comment test 1", "me");         ws.cells[1, 2].addcomment("comment test 2", "me");         ws.cells[1, 3].addcomment("comment test 3", "me");          //alternate way add comment         ws.comments.add(ws.cells[1, 4], "comment test 4", "me");          //remove middle comment         ws.comments.remove(ws.cells[1,2].comment);          package2.save();     } } 

Comments

  1. Got your journals and articles index by Google Scholar, Scopus, Web of Science etc. visit http://sch.com.pk for more details.

    ReplyDelete

Post a Comment

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -