Creates a pattern fill to apply to the object using the selected pattern as the object background.
Name | Type | Description |
sPatternType | PatternType | The pattern type used for the fill selected from one of the available pattern types. |
BgColor | ApiUniColor | The background color used for the pattern creation. |
FgColor | ApiUniColor | The foreground color used for the pattern creation. |
builder.CreateFile("xlsx"); var oWorksheet = Api.GetActiveSheet(); var oFill = Api.CreatePatternFill("dashDnDiag", Api.CreateRGBColor(255, 111, 61), Api.CreateRGBColor(51, 51, 51)); var oStroke = Api.CreateStroke(0, Api.CreateNoFill()); oWorksheet.AddShape("flowChartOnlineStorage", 60 * 36000, 35 * 36000, oFill, oStroke, 0, 2 * 36000, 1, 3 * 36000); builder.SaveFile("xlsx", "CreatePatternFill.xlsx"); builder.CloseFile();