You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JanKallman edited this page Oct 19, 2023
·
10 revisions
You can add Comments (in later Excel versions called Notes) either via the ExcelRange class or via the Comments property on the ExcelWorksheet class. Comments/Notes can be added using plain text or using richtext as descibed in this example below.
using(varpackage=newExcelPackage(@"c:\temp\commentstest.xlsx")){varws=package.Workbook.Worksheets.Add("comments");//Add Comments using the range classvarcomment=ws.Cells["A3"].AddComment("Jan Källman:\r\n","JK");comment.Font