File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -1604,8 +1604,15 @@ ws.getCell('A2').fill = {
1604
1604
bgColor: {argb: ' FF0000FF' }
1605
1605
};
1606
1606
1607
- // fill A3 with blue-white-blue gradient from left to right
1607
+ // fill A3 with solid coral
1608
1608
ws .getCell (' A3' ).fill = {
1609
+ type: ' pattern' ,
1610
+ pattern: ' solid' ,
1611
+ fgColor: {argb: ' F08080' },
1612
+ };
1613
+
1614
+ // fill A4 with blue-white-blue gradient from left to right
1615
+ ws .getCell (' A4' ).fill = {
1609
1616
type: ' gradient' ,
1610
1617
gradient: ' angle' ,
1611
1618
degree: 0 ,
@@ -1617,8 +1624,8 @@ ws.getCell('A3').fill = {
1617
1624
};
1618
1625
1619
1626
1620
- // fill A4 with red-green gradient from center
1621
- ws .getCell (' A4 ' ).fill = {
1627
+ // fill A5 with red-green gradient from center
1628
+ ws .getCell (' A5 ' ).fill = {
1622
1629
type: ' gradient' ,
1623
1630
gradient: ' path' ,
1624
1631
center: {left: 0.5 ,top: 0.5 },
@@ -1638,6 +1645,10 @@ ws.getCell('A4').fill = {
1638
1645
| fgColor | N | Specifies the pattern foreground color. Default is black. |
1639
1646
| bgColor | N | Specifies the pattern background color. Default is white. |
1640
1647
1648
+ Note: If you want to fill a cell using the ` solid ` pattern, then you don't need to specify ` bgColor ` .
1649
+ See example above for cell ` A3 ` with a ` solid ` pattern and a coral ` fgColor ` .
1650
+
1651
+
1641
1652
** Valid Pattern Types**
1642
1653
1643
1654
* none
You can’t perform that action at this time.
0 commit comments