//create a new workbook var workbook = new GrapeCity.Documents.Excel.Workbook(); IWorksheet worksheet = workbook.Worksheets[0]; GrapeCity.Documents.Excel.Drawing.IShape shape = worksheet.Shapes.AddShape(GrapeCity.Documents.Excel.Drawing.AutoShapeType.Parallelogram, 1, 1, 200, 100); shape.Fill.Patterned(GrapeCity.Documents.Excel.Drawing.PatternType.Percent10); shape.Fill.Color.ObjectThemeColor = ThemeColor.Accent2; shape.Fill.PatternColor.ObjectThemeColor = ThemeColor.Accent6;
' Create a new Workbook Dim workbook As New Workbook Dim worksheet As IWorksheet = workbook.Worksheets(0) Dim shape As IShape = worksheet.Shapes.AddShape(AutoShapeType.Parallelogram, 1, 1, 200, 100) shape.Fill.Patterned(PatternType.Percent10) shape.Fill.Color.ObjectThemeColor = ThemeColor.Accent2 shape.Fill.PatternColor.ObjectThemeColor = ThemeColor.Accent6 ' save to an excel file workbook.Save("ConfigShapeWithPatternFill.xlsx")