//create a new workbook var workbook = new GrapeCity.Documents.Excel.Workbook(); IWorksheet worksheet = workbook.Worksheets[0]; IComment commentC3 = worksheet.Range["C3"].AddComment("Range C3's comment."); commentC3.Shape.Line.Color.RGB = Color.LightGreen; commentC3.Shape.Line.Weight = 3; commentC3.Shape.Line.Style = GrapeCity.Documents.Excel.Drawing.LineStyle.ThickThin; commentC3.Shape.Line.DashStyle = GrapeCity.Documents.Excel.Drawing.LineDashStyle.Solid; commentC3.Shape.Fill.Color.RGB = Color.Pink; commentC3.Shape.Width = 100; commentC3.Shape.Height = 200; commentC3.Shape.TextFrame.TextRange.Font.Bold = true; commentC3.Visible = true;
' Create a new Workbook Dim workbook As New Workbook Dim worksheet As IWorksheet = workbook.Worksheets(0) Dim commentC3 As IComment = worksheet.Range!C3.AddComment("Range C3's comment.") commentC3.Shape.Line.Color.RGB = Color.LightGreen commentC3.Shape.Line.Weight = 3 commentC3.Shape.Line.Style = LineStyle.ThickThin commentC3.Shape.Line.DashStyle = LineDashStyle.Solid commentC3.Shape.Fill.Color.RGB = Color.Pink commentC3.Shape.Width = 100 commentC3.Shape.Height = 200 commentC3.Shape.TextFrame.TextRange.Font.Bold = True commentC3.Visible = True ' save to an excel file workbook.Save("ConfigCommentLayout.xlsx")