//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.PresetTextured(GrapeCity.Documents.Excel.Drawing.PresetTexture.Canvas); shape.Fill.TextureAlignment = GrapeCity.Documents.Excel.Drawing.TextureAlignment.Center; shape.Fill.TextureOffsetX = 2.5; shape.Fill.TextureOffsetY = 3.2; shape.Fill.TextureHorizontalScale = 0.9; shape.Fill.TextureVerticalScale = 0.2; shape.Fill.Transparency = 0.5;
' 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.PresetTextured(PresetTexture.Canvas) shape.Fill.TextureAlignment = TextureAlignment.Center shape.Fill.TextureOffsetX = 2.5 shape.Fill.TextureOffsetY = 3.2 shape.Fill.TextureHorizontalScale = 0.9 shape.Fill.TextureVerticalScale = 0.2 shape.Fill.Transparency = 0.5 ' save to an excel file workbook.Save("ConfigShapeWithTextureFill.xlsx")