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(); } }
Got your journals and articles index by Google Scholar, Scopus, Web of Science etc. visit http://sch.com.pk for more details.
ReplyDelete