//create a new workbook var workbook = new GrapeCity.Documents.Excel.Workbook(); IWorksheet worksheet = workbook.Worksheets[0]; //create comment for range C3. IComment comment = worksheet.Range["C3"].AddComment("Range C3's comment."); //change comment's text. comment.Text = "Range C3's new comment.";
' Create a new Workbook Dim workbook As New Workbook Dim worksheet As IWorksheet = workbook.Worksheets(0) 'create comment for range C3. Dim comment As IComment = worksheet.Range!C3.AddComment("Range C3's comment.") 'change comment's text. comment.Text = "Range C3's new comment." ' save to an excel file workbook.Save("AddComment.xlsx")