// 新規ワークブックの作成 var workbook = new GrapeCity.Documents.Excel.Workbook(); IWorksheet worksheet = workbook.Worksheets[0]; IComment commentC3 = worksheet.Range["C3"].AddComment("範囲[C3]のコメント"); // コメントのレイアウトを設定 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; // xlsx ファイルに保存 workbook.Save("ConfigCommentLayout.xlsx");
' 新規ワークブックの作成 Dim workbook As New Workbook Dim worksheet As IWorksheet = workbook.Worksheets(0) Dim commentC3 As IComment = worksheet.Range!C3.AddComment("範囲[C3]のコメント") ' コメントのレイアウトを設定 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 ' xlsx ファイルに保存 workbook.Save("ConfigCommentLayout.xlsx")