[{"data":1,"prerenderedAt":2522},["ShallowReactive",2],{"doc:\u002Fadvanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Fhighlight-weekends-and-holidays-in-a-date-column":3,"surround:\u002Fadvanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Fhighlight-weekends-and-holidays-in-a-date-column":2489,"ancestors:\u002Fadvanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Fhighlight-weekends-and-holidays-in-a-date-column":2498,"children:\u002Fadvanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Fhighlight-weekends-and-holidays-in-a-date-column":2503,"related:\u002Fadvanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Fhighlight-weekends-and-holidays-in-a-date-column":2504},{"id":4,"title":5,"body":6,"dateModified":2454,"datePublished":2454,"description":2455,"extension":2456,"faq":2457,"keyword":2466,"kind":2467,"meta":2468,"navigation":139,"path":2478,"seo":2479,"slug":2482,"stem":2483,"topics":2484,"type":2487,"__hash__":2488},"docs\u002Fadvanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Fhighlight-weekends-and-holidays-in-a-date-column\u002Findex.md","Highlight Weekends and Holidays in a Date Column",{"type":7,"value":8,"toc":2442},"minimark",[9,28,33,61,71,75,78,647,657,661,667,822,836,840,848,999,1013,1180,1361,1365,1372,1683,1698,1775,1779,1782,2293,2307,2311,2357,2361,2377,2381,2387,2393,2399,2405,2409,2438],[10,11,12,13,17,18,21,22,27],"p",{},"Daily logs, timesheets, delivery schedules and project timelines all have a date column, and the first thing a reader looks for is which days were not normal working days. Shading weekends and public holidays makes gaps and spikes explain themselves — no orders on 31 August, because it was a bank holiday. Doing it with conditional formatting rather than fixed fills means the shading stays correct when rows are added, dates are edited or the sheet is re-sorted. This page writes the rules with openpyxl: a ",[14,15,16],"code",{},"WEEKDAY"," test for weekends, a holiday list generated with the ",[14,19,20],{},"holidays"," package and kept on its own sheet, an ordering that lets holidays take precedence, the same rules applied across a row of dates for planner layouts, and a check of which dates each rule actually catches. It belongs to ",[23,24,26],"a",{"href":25},"\u002Fadvanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002F","Applying Conditional Formatting with openpyxl",".",[29,30,32],"h2",{"id":31},"prerequisites","Prerequisites",[34,35,40],"pre",{"className":36,"code":37,"language":38,"meta":39,"style":39},"language-bash shiki shiki-themes github-light github-dark-high-contrast","pip install openpyxl holidays\n","bash","",[14,41,42],{"__ignoreMap":39},[43,44,47,51,55,58],"span",{"class":45,"line":46},"line",1,[43,48,50],{"class":49},"sMTad","pip",[43,52,54],{"class":53},"srMev"," install",[43,56,57],{"class":53}," openpyxl",[43,59,60],{"class":53}," holidays\n",[10,62,63,64,66,67,70],{},"The ",[14,65,20],{}," package knows the public holidays of most countries and their regions. The examples use England's bank holidays for 2026 and a daily orders log from 24 August to 13 September 2026, which spans the late-summer bank holiday. LibreOffice (",[14,68,69],{},"soffice",") recalculates helper formulas in Step 5; it is optional.",[29,72,74],{"id":73},"step-1-write-the-data-and-the-holiday-list","Step 1 — Write the data and the holiday list",[10,76,77],{},"Generate the holidays for the years the sheet covers and put them on their own sheet, with names, so readers can see why a date is shaded:",[34,79,83],{"className":80,"code":81,"language":82,"meta":39,"style":39},"language-python shiki shiki-themes github-light github-dark-high-contrast","from datetime import date, timedelta\nimport holidays\nfrom openpyxl import Workbook\nfrom openpyxl.styles import Font\n\nwb = Workbook()\nlog = wb.active\nlog.title = \"Orders\"\nlog.append([\"Date\", \"Orders\", \"Revenue\"])\nstart = date(2026, 8, 24)\nfor i in range(21):\n    d = start + timedelta(days=i)\n    busy = d.weekday() \u003C 5 and d != date(2026, 8, 31)\n    log.append([d, 40 + (i * 7) % 25 if busy else 3, (40 + (i * 7) % 25) * 52.5 if busy else 120.0])\nfor row in log.iter_rows(min_row=2, max_col=1):\n    row[0].number_format = \"ddd dd mmm yyyy\"\nlog.column_dimensions[\"A\"].width = 18\n\nhol = wb.create_sheet(\"Holidays\")\nhol.append([\"Date\", \"Holiday\"])\nfor d, name in sorted(holidays.UK(subdiv=\"ENG\", years=[2026, 2027]).items()):\n    hol.append([d, name])\n    hol.cell(hol.max_row, 1).number_format = \"yyyy-mm-dd\"\nfor ws in (log, hol):\n    for c in ws[1]:\n        c.font = Font(bold=True)\nprint(hol.max_row - 1, \"holidays listed; first:\", hol[\"B2\"].value)\n","python",[14,84,85,101,108,121,134,141,153,164,175,198,226,250,276,317,396,429,446,463,468,484,499,543,549,565,578,597,618],{"__ignoreMap":39},[43,86,87,91,95,98],{"class":45,"line":46},[43,88,90],{"class":89},"s-kum","from",[43,92,94],{"class":93},"skGVy"," datetime ",[43,96,97],{"class":89},"import",[43,99,100],{"class":93}," date, timedelta\n",[43,102,104,106],{"class":45,"line":103},2,[43,105,97],{"class":89},[43,107,60],{"class":93},[43,109,111,113,116,118],{"class":45,"line":110},3,[43,112,90],{"class":89},[43,114,115],{"class":93}," openpyxl ",[43,117,97],{"class":89},[43,119,120],{"class":93}," Workbook\n",[43,122,124,126,129,131],{"class":45,"line":123},4,[43,125,90],{"class":89},[43,127,128],{"class":93}," openpyxl.styles ",[43,130,97],{"class":89},[43,132,133],{"class":93}," Font\n",[43,135,137],{"class":45,"line":136},5,[43,138,140],{"emptyLinePlaceholder":139},true,"\n",[43,142,144,147,150],{"class":45,"line":143},6,[43,145,146],{"class":93},"wb ",[43,148,149],{"class":89},"=",[43,151,152],{"class":93}," Workbook()\n",[43,154,156,159,161],{"class":45,"line":155},7,[43,157,158],{"class":93},"log ",[43,160,149],{"class":89},[43,162,163],{"class":93}," wb.active\n",[43,165,167,170,172],{"class":45,"line":166},8,[43,168,169],{"class":93},"log.title ",[43,171,149],{"class":89},[43,173,174],{"class":53}," \"Orders\"\n",[43,176,178,181,184,187,190,192,195],{"class":45,"line":177},9,[43,179,180],{"class":93},"log.append([",[43,182,183],{"class":53},"\"Date\"",[43,185,186],{"class":93},", ",[43,188,189],{"class":53},"\"Orders\"",[43,191,186],{"class":93},[43,193,194],{"class":53},"\"Revenue\"",[43,196,197],{"class":93},"])\n",[43,199,201,204,206,209,213,215,218,220,223],{"class":45,"line":200},10,[43,202,203],{"class":93},"start ",[43,205,149],{"class":89},[43,207,208],{"class":93}," date(",[43,210,212],{"class":211},"sP0c6","2026",[43,214,186],{"class":93},[43,216,217],{"class":211},"8",[43,219,186],{"class":93},[43,221,222],{"class":211},"24",[43,224,225],{"class":93},")\n",[43,227,229,232,235,238,241,244,247],{"class":45,"line":228},11,[43,230,231],{"class":89},"for",[43,233,234],{"class":93}," i ",[43,236,237],{"class":89},"in",[43,239,240],{"class":211}," range",[43,242,243],{"class":93},"(",[43,245,246],{"class":211},"21",[43,248,249],{"class":93},"):\n",[43,251,253,256,258,261,264,267,271,273],{"class":45,"line":252},12,[43,254,255],{"class":93},"    d ",[43,257,149],{"class":89},[43,259,260],{"class":93}," start ",[43,262,263],{"class":89},"+",[43,265,266],{"class":93}," timedelta(",[43,268,270],{"class":269},"sa561","days",[43,272,149],{"class":89},[43,274,275],{"class":93},"i)\n",[43,277,279,282,284,287,290,293,296,299,302,304,306,308,310,312,315],{"class":45,"line":278},13,[43,280,281],{"class":93},"    busy ",[43,283,149],{"class":89},[43,285,286],{"class":93}," d.weekday() ",[43,288,289],{"class":89},"\u003C",[43,291,292],{"class":211}," 5",[43,294,295],{"class":89}," and",[43,297,298],{"class":93}," d ",[43,300,301],{"class":89},"!=",[43,303,208],{"class":93},[43,305,212],{"class":211},[43,307,186],{"class":93},[43,309,217],{"class":211},[43,311,186],{"class":93},[43,313,314],{"class":211},"31",[43,316,225],{"class":93},[43,318,320,323,326,329,332,335,338,341,344,347,350,353,356,359,362,364,366,368,370,372,374,376,378,380,382,385,387,389,391,394],{"class":45,"line":319},14,[43,321,322],{"class":93},"    log.append([d, ",[43,324,325],{"class":211},"40",[43,327,328],{"class":89}," +",[43,330,331],{"class":93}," (i ",[43,333,334],{"class":89},"*",[43,336,337],{"class":211}," 7",[43,339,340],{"class":93},") ",[43,342,343],{"class":89},"%",[43,345,346],{"class":211}," 25",[43,348,349],{"class":89}," if",[43,351,352],{"class":93}," busy ",[43,354,355],{"class":89},"else",[43,357,358],{"class":211}," 3",[43,360,361],{"class":93},", (",[43,363,325],{"class":211},[43,365,328],{"class":89},[43,367,331],{"class":93},[43,369,334],{"class":89},[43,371,337],{"class":211},[43,373,340],{"class":93},[43,375,343],{"class":89},[43,377,346],{"class":211},[43,379,340],{"class":93},[43,381,334],{"class":89},[43,383,384],{"class":211}," 52.5",[43,386,349],{"class":89},[43,388,352],{"class":93},[43,390,355],{"class":89},[43,392,393],{"class":211}," 120.0",[43,395,197],{"class":93},[43,397,399,401,404,406,409,412,414,417,419,422,424,427],{"class":45,"line":398},15,[43,400,231],{"class":89},[43,402,403],{"class":93}," row ",[43,405,237],{"class":89},[43,407,408],{"class":93}," log.iter_rows(",[43,410,411],{"class":269},"min_row",[43,413,149],{"class":89},[43,415,416],{"class":211},"2",[43,418,186],{"class":93},[43,420,421],{"class":269},"max_col",[43,423,149],{"class":89},[43,425,426],{"class":211},"1",[43,428,249],{"class":93},[43,430,432,435,438,441,443],{"class":45,"line":431},16,[43,433,434],{"class":93},"    row[",[43,436,437],{"class":211},"0",[43,439,440],{"class":93},"].number_format ",[43,442,149],{"class":89},[43,444,445],{"class":53}," \"ddd dd mmm yyyy\"\n",[43,447,449,452,455,458,460],{"class":45,"line":448},17,[43,450,451],{"class":93},"log.column_dimensions[",[43,453,454],{"class":53},"\"A\"",[43,456,457],{"class":93},"].width ",[43,459,149],{"class":89},[43,461,462],{"class":211}," 18\n",[43,464,466],{"class":45,"line":465},18,[43,467,140],{"emptyLinePlaceholder":139},[43,469,471,474,476,479,482],{"class":45,"line":470},19,[43,472,473],{"class":93},"hol ",[43,475,149],{"class":89},[43,477,478],{"class":93}," wb.create_sheet(",[43,480,481],{"class":53},"\"Holidays\"",[43,483,225],{"class":93},[43,485,487,490,492,494,497],{"class":45,"line":486},20,[43,488,489],{"class":93},"hol.append([",[43,491,183],{"class":53},[43,493,186],{"class":93},[43,495,496],{"class":53},"\"Holiday\"",[43,498,197],{"class":93},[43,500,502,504,507,509,512,515,518,520,523,525,528,530,533,535,537,540],{"class":45,"line":501},21,[43,503,231],{"class":89},[43,505,506],{"class":93}," d, name ",[43,508,237],{"class":89},[43,510,511],{"class":211}," sorted",[43,513,514],{"class":93},"(holidays.UK(",[43,516,517],{"class":269},"subdiv",[43,519,149],{"class":89},[43,521,522],{"class":53},"\"ENG\"",[43,524,186],{"class":93},[43,526,527],{"class":269},"years",[43,529,149],{"class":89},[43,531,532],{"class":93},"[",[43,534,212],{"class":211},[43,536,186],{"class":93},[43,538,539],{"class":211},"2027",[43,541,542],{"class":93},"]).items()):\n",[43,544,546],{"class":45,"line":545},22,[43,547,548],{"class":93},"    hol.append([d, name])\n",[43,550,552,555,557,560,562],{"class":45,"line":551},23,[43,553,554],{"class":93},"    hol.cell(hol.max_row, ",[43,556,426],{"class":211},[43,558,559],{"class":93},").number_format ",[43,561,149],{"class":89},[43,563,564],{"class":53}," \"yyyy-mm-dd\"\n",[43,566,568,570,573,575],{"class":45,"line":567},24,[43,569,231],{"class":89},[43,571,572],{"class":93}," ws ",[43,574,237],{"class":89},[43,576,577],{"class":93}," (log, hol):\n",[43,579,581,584,587,589,592,594],{"class":45,"line":580},25,[43,582,583],{"class":89},"    for",[43,585,586],{"class":93}," c ",[43,588,237],{"class":89},[43,590,591],{"class":93}," ws[",[43,593,426],{"class":211},[43,595,596],{"class":93},"]:\n",[43,598,600,603,605,608,611,613,616],{"class":45,"line":599},26,[43,601,602],{"class":93},"        c.font ",[43,604,149],{"class":89},[43,606,607],{"class":93}," Font(",[43,609,610],{"class":269},"bold",[43,612,149],{"class":89},[43,614,615],{"class":211},"True",[43,617,225],{"class":93},[43,619,621,624,627,630,633,635,638,641,644],{"class":45,"line":620},27,[43,622,623],{"class":211},"print",[43,625,626],{"class":93},"(hol.max_row ",[43,628,629],{"class":89},"-",[43,631,632],{"class":211}," 1",[43,634,186],{"class":93},[43,636,637],{"class":53},"\"holidays listed; first:\"",[43,639,640],{"class":93},", hol[",[43,642,643],{"class":53},"\"B2\"",[43,645,646],{"class":93},"].value)\n",[10,648,649,652,653,656],{},[14,650,651],{},"holidays.UK(subdiv=\"ENG\", years=[...])"," returns England's bank holidays — including substitute days such as \"Boxing Day (observed)\" when a holiday falls on a weekend — as a dictionary of dates and names. Writing them as real dates on a Holidays sheet, two years at a time, keeps the rule simple and lets someone add a company shutdown day by hand. The number format ",[14,654,655],{},"ddd dd mmm yyyy"," shows the weekday next to each date in the log, which helps readers check the shading. Use your own country and region codes; the package covers well over a hundred countries.",[29,658,660],{"id":659},"step-2-a-weekend-rule","Step 2 — A weekend rule",[10,662,663,666],{},[14,664,665],{},"WEEKDAY(date, 2)"," numbers Monday as 1 and Sunday as 7, so a weekend is any value above 5. Apply the rule to the whole data range so entire rows are shaded:",[34,668,670],{"className":80,"code":669,"language":82,"meta":39,"style":39},"from openpyxl.formatting.rule import FormulaRule\nfrom openpyxl.styles import PatternFill\n\nlast = log.max_row\nweekend_fill = PatternFill(\"solid\", fgColor=\"E7E6E6\")\nholiday_fill = PatternFill(\"solid\", fgColor=\"FCE4D6\")\n\nweekend_rule = FormulaRule(formula=[\"WEEKDAY($A2,2)>5\"], fill=weekend_fill, font=Font(color=\"7F7F7F\"))\nprint(\"weekend rule:\", weekend_rule.formula)\n",[14,671,672,684,695,699,709,734,756,760,810],{"__ignoreMap":39},[43,673,674,676,679,681],{"class":45,"line":46},[43,675,90],{"class":89},[43,677,678],{"class":93}," openpyxl.formatting.rule ",[43,680,97],{"class":89},[43,682,683],{"class":93}," FormulaRule\n",[43,685,686,688,690,692],{"class":45,"line":103},[43,687,90],{"class":89},[43,689,128],{"class":93},[43,691,97],{"class":89},[43,693,694],{"class":93}," PatternFill\n",[43,696,697],{"class":45,"line":110},[43,698,140],{"emptyLinePlaceholder":139},[43,700,701,704,706],{"class":45,"line":123},[43,702,703],{"class":93},"last ",[43,705,149],{"class":89},[43,707,708],{"class":93}," log.max_row\n",[43,710,711,714,716,719,722,724,727,729,732],{"class":45,"line":136},[43,712,713],{"class":93},"weekend_fill ",[43,715,149],{"class":89},[43,717,718],{"class":93}," PatternFill(",[43,720,721],{"class":53},"\"solid\"",[43,723,186],{"class":93},[43,725,726],{"class":269},"fgColor",[43,728,149],{"class":89},[43,730,731],{"class":53},"\"E7E6E6\"",[43,733,225],{"class":93},[43,735,736,739,741,743,745,747,749,751,754],{"class":45,"line":143},[43,737,738],{"class":93},"holiday_fill ",[43,740,149],{"class":89},[43,742,718],{"class":93},[43,744,721],{"class":53},[43,746,186],{"class":93},[43,748,726],{"class":269},[43,750,149],{"class":89},[43,752,753],{"class":53},"\"FCE4D6\"",[43,755,225],{"class":93},[43,757,758],{"class":45,"line":155},[43,759,140],{"emptyLinePlaceholder":139},[43,761,762,765,767,770,773,775,777,780,783,786,788,791,794,796,799,802,804,807],{"class":45,"line":166},[43,763,764],{"class":93},"weekend_rule ",[43,766,149],{"class":89},[43,768,769],{"class":93}," FormulaRule(",[43,771,772],{"class":269},"formula",[43,774,149],{"class":89},[43,776,532],{"class":93},[43,778,779],{"class":53},"\"WEEKDAY($A2,2)>5\"",[43,781,782],{"class":93},"], ",[43,784,785],{"class":269},"fill",[43,787,149],{"class":89},[43,789,790],{"class":93},"weekend_fill, ",[43,792,793],{"class":269},"font",[43,795,149],{"class":89},[43,797,798],{"class":93},"Font(",[43,800,801],{"class":269},"color",[43,803,149],{"class":89},[43,805,806],{"class":53},"\"7F7F7F\"",[43,808,809],{"class":93},"))\n",[43,811,812,814,816,819],{"class":45,"line":177},[43,813,623],{"class":211},[43,815,243],{"class":93},[43,817,818],{"class":53},"\"weekend rule:\"",[43,820,821],{"class":93},", weekend_rule.formula)\n",[10,823,824,825,827,828,831,832,835],{},"The second argument of ",[14,826,16],{}," matters: with the default (1), Sunday is 1 and Saturday is 7, so ",[14,829,830],{},">5"," would wrongly shade Thursdays and Fridays. Return type 2 makes the test read naturally. ",[14,833,834],{},"$A2"," anchors the column, so every cell in the row looks at the row's date, and leaves the row relative, so each row tests its own date. The rule is created here and added in the next step, together with the holiday rule, because their order matters.",[29,837,839],{"id":838},"step-3-a-holiday-rule-that-takes-precedence","Step 3 — A holiday rule that takes precedence",[10,841,842,843,847],{},"A holiday that falls on a weekday should look different from an ordinary weekend, and a holiday on a weekend should still look like a holiday. Add the holiday rule ",[844,845,846],"em",{},"first"," and stop evaluation there:",[34,849,851],{"className":80,"code":850,"language":82,"meta":39,"style":39},"holiday_rule = FormulaRule(formula=[\"COUNTIF(Holidays!$A$2:$A$200,$A2)>0\"], fill=holiday_fill,\n                           font=Font(color=\"C65911\", bold=True), stopIfTrue=True)\nlog.conditional_formatting.add(f\"A2:C{last}\", holiday_rule)\nlog.conditional_formatting.add(f\"A2:C{last}\", weekend_rule)\nwb.save(\"orders_shaded.xlsx\")\nprint([r.formula for rules in log.conditional_formatting._cf_rules.values() for r in rules])\n",[14,852,853,880,916,943,962,972],{"__ignoreMap":39},[43,854,855,858,860,862,864,866,868,871,873,875,877],{"class":45,"line":46},[43,856,857],{"class":93},"holiday_rule ",[43,859,149],{"class":89},[43,861,769],{"class":93},[43,863,772],{"class":269},[43,865,149],{"class":89},[43,867,532],{"class":93},[43,869,870],{"class":53},"\"COUNTIF(Holidays!$A$2:$A$200,$A2)>0\"",[43,872,782],{"class":93},[43,874,785],{"class":269},[43,876,149],{"class":89},[43,878,879],{"class":93},"holiday_fill,\n",[43,881,882,885,887,889,891,893,896,898,900,902,904,907,910,912,914],{"class":45,"line":103},[43,883,884],{"class":269},"                           font",[43,886,149],{"class":89},[43,888,798],{"class":93},[43,890,801],{"class":269},[43,892,149],{"class":89},[43,894,895],{"class":53},"\"C65911\"",[43,897,186],{"class":93},[43,899,610],{"class":269},[43,901,149],{"class":89},[43,903,615],{"class":211},[43,905,906],{"class":93},"), ",[43,908,909],{"class":269},"stopIfTrue",[43,911,149],{"class":89},[43,913,615],{"class":211},[43,915,225],{"class":93},[43,917,918,921,924,927,931,934,937,940],{"class":45,"line":110},[43,919,920],{"class":93},"log.conditional_formatting.add(",[43,922,923],{"class":89},"f",[43,925,926],{"class":53},"\"A2:C",[43,928,930],{"class":929},"sSjpA","{",[43,932,933],{"class":93},"last",[43,935,936],{"class":929},"}",[43,938,939],{"class":53},"\"",[43,941,942],{"class":93},", holiday_rule)\n",[43,944,945,947,949,951,953,955,957,959],{"class":45,"line":123},[43,946,920],{"class":93},[43,948,923],{"class":89},[43,950,926],{"class":53},[43,952,930],{"class":929},[43,954,933],{"class":93},[43,956,936],{"class":929},[43,958,939],{"class":53},[43,960,961],{"class":93},", weekend_rule)\n",[43,963,964,967,970],{"class":45,"line":136},[43,965,966],{"class":93},"wb.save(",[43,968,969],{"class":53},"\"orders_shaded.xlsx\"",[43,971,225],{"class":93},[43,973,974,976,979,981,984,986,989,991,994,996],{"class":45,"line":143},[43,975,623],{"class":211},[43,977,978],{"class":93},"([r.formula ",[43,980,231],{"class":89},[43,982,983],{"class":93}," rules ",[43,985,237],{"class":89},[43,987,988],{"class":93}," log.conditional_formatting._cf_rules.values() ",[43,990,231],{"class":89},[43,992,993],{"class":93}," r ",[43,995,237],{"class":89},[43,997,998],{"class":93}," rules])\n",[10,1000,1001,1002,1004,1005,1008,1009,27],{},"Rules added first get the higher priority. With ",[14,1003,909],{},", a date that is a holiday gets the holiday format and the weekend rule is not applied, so a bank holiday Monday is orange and bold rather than grey. The ",[14,1006,1007],{},"COUNTIF"," compares each date with the holiday list; because both are real dates, the comparison is exact — if the dates in either place were text, nothing would match. The list range is larger than the list, so holidays for later years can be appended without editing the rule. Rule order is covered in more detail in ",[23,1010,1012],{"href":1011},"\u002Fadvanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Fcontrol-conditional-formatting-rule-order-and-stop-if-true\u002F","Control Conditional Formatting Rule Order and Stop If True",[1014,1015,1023,1024,1023,1028,1023,1032,1023,1039,1023,1049,1023,1060,1023,1066,1023,1070,1023,1074,1023,1077,1023,1082,1023,1091,1023,1096,1023,1104,1023,1111,1023,1116,1023,1121,1023,1123,1023,1126,1023,1130,1023,1133,1023,1137,1023,1144,1023,1148,1023,1151,1023,1153,1023,1156,1023,1160,1023,1163,1023,1168,1023,1175],"svg",{"viewBox":1016,"role":1017,"ariaLabelledBy":1018,"xmlns":1021,"style":1022},"4 0 752 272","img",[1019,1020],"wk-order-t","wk-order-d","http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg","width:100%;max-width:752px;height:auto;display:block;margin:1.5rem auto;font-family:Inter,ui-sans-serif,system-ui,sans-serif","\n  ",[1025,1026,1027],"title",{"id":1019},"Which format a date gets",[1029,1030,1031],"desc",{"id":1020},"Each date is first checked against the holiday list. If it is a holiday, it gets the holiday format and evaluation stops. Otherwise, if WEEKDAY with return type 2 is above 5, it gets the weekend format. Any other date keeps the normal format.",[1033,1034],"rect",{"x":1035,"y":437,"width":1036,"height":1037,"fill":1038},"4","752","272","#ffffff",[1033,1040],{"x":1041,"y":1042,"width":1043,"height":1044,"rx":1045,"fill":1046,"stroke":1047,"style":1048},"240.0","16.0","280.0","75.5","12","#f0f4ff","var(--brand,#5b5cf0)","stroke-width:2px",[1050,1051,1053],"g",{"transform":1052},"translate(368.0,29.0) scale(1.000)",[1054,1055],"path",{"d":1056,"fill":1057,"stroke":1058,"style":1059},"M4 5h16v15H4z M4 10h16 M8 3v4 M16 3v4","none","var(--brand-strong,#4338ca)","stroke-width:1.80px;stroke-linecap:round;stroke-linejoin:round",[1061,1062,1065],"text",{"x":1063,"y":1044,"style":1064},"380.0","font-size:13.5px;font-weight:700;fill:var(--brand-strong,#4338ca);text-anchor:middle","For each date in column A",[45,1067],{"x1":1063,"y1":1068,"x2":1063,"y2":1069,"stroke":1047,"style":1048},"91.5","111.5",[45,1071],{"x1":1072,"y1":1069,"x2":1073,"y2":1069,"stroke":1047,"style":1048},"134.7","625.3",[45,1075],{"x1":1072,"y1":1069,"x2":1072,"y2":1076,"stroke":1047,"style":1048},"157.5",[1078,1079],"polygon",{"points":1080,"fill":1081},"134.7,161.5 129.7,152.5 139.7,152.5","#5b5cf0",[1033,1083],{"x":1084,"y":1085,"width":1086,"height":1087,"rx":1088,"fill":1038,"stroke":1089,"style":1090},"75.9","121.5","117.6","21.0","10","var(--line,#cdd5e6)","stroke-width:1.2px",[1061,1092,1095],{"x":1072,"y":1093,"style":1094},"136.0","font-size:11.5px;font-weight:700;fill:var(--muted,#5b6780);text-anchor:middle","in the holiday list",[1033,1097],{"x":1098,"y":1099,"width":1100,"height":1101,"rx":1045,"fill":1102,"stroke":1103,"style":1048},"20.0","163.5","229.3","93.0","#fdefd8","var(--gold,#b4740a)",[1050,1105,1107],{"transform":1106},"translate(122.7,176.5) scale(1.000)",[1054,1108],{"d":1109,"fill":1057,"stroke":1110,"style":1059},"M13 2L4 14h7l-1 8 9-12h-7z","var(--gold-ink,#7a4e06)",[1061,1112,1115],{"x":1072,"y":1113,"style":1114},"223.0","font-size:13.5px;font-weight:700;fill:var(--gold-ink,#7a4e06);text-anchor:middle","holiday format",[1061,1117,1120],{"x":1072,"y":1118,"style":1119},"242.5","font-size:11.5px;font-weight:400;fill:var(--text,#172033);text-anchor:middle","orange, bold · stop here",[45,1122],{"x1":1063,"y1":1069,"x2":1063,"y2":1076,"stroke":1047,"style":1048},[1078,1124],{"points":1125,"fill":1081},"380.0,161.5 375.0,152.5 385.0,152.5",[1033,1127],{"x":1128,"y":1085,"width":1129,"height":1087,"rx":1088,"fill":1038,"stroke":1089,"style":1090},"305.6","148.9",[1061,1131,1132],{"x":1063,"y":1093,"style":1094},"WEEKDAY(date,2) > 5",[1033,1134],{"x":1135,"y":1099,"width":1100,"height":1101,"rx":1045,"fill":1136,"stroke":1089,"style":1048},"265.3","#e7ebef",[1050,1138,1140],{"transform":1139},"translate(368.0,176.5) scale(1.000)",[1054,1141],{"d":1142,"fill":1057,"stroke":1143,"style":1059},"M12 3a9 9 0 1 0 .01 0z M12 7v5l3.5 2","var(--text,#172033)",[1061,1145,1147],{"x":1063,"y":1113,"style":1146},"font-size:13.5px;font-weight:700;fill:var(--text,#172033);text-anchor:middle","weekend format",[1061,1149,1150],{"x":1063,"y":1118,"style":1119},"grey",[45,1152],{"x1":1073,"y1":1069,"x2":1073,"y2":1076,"stroke":1047,"style":1048},[1078,1154],{"points":1155,"fill":1081},"625.3,161.5 620.3,152.5 630.3,152.5",[1033,1157],{"x":1158,"y":1085,"width":1159,"height":1087,"rx":1088,"fill":1038,"stroke":1089,"style":1090},"586.9","77.0",[1061,1161,1162],{"x":1073,"y":1093,"style":1094},"otherwise",[1033,1164],{"x":1165,"y":1099,"width":1100,"height":1101,"rx":1045,"fill":1166,"stroke":1167,"style":1048},"510.7","#d9f4f1","var(--teal,#0f9488)",[1050,1169,1171],{"transform":1170},"translate(613.3,185.2) scale(1.000)",[1054,1172],{"d":1173,"fill":1057,"stroke":1174,"style":1059},"M5 12.5l4.5 4.5L19 7","var(--teal-ink,#0b6157)",[1061,1176,1179],{"x":1073,"y":1177,"style":1178},"231.8","font-size:13.5px;font-weight:700;fill:var(--teal-ink,#0b6157);text-anchor:middle","normal row",[1014,1181,1023,1187,1023,1190,1023,1193,1023,1198,1023,1204,1023,1208,1023,1214,1023,1218,1023,1222,1023,1226,1023,1230,1023,1234,1023,1238,1023,1241,1023,1245,1023,1247,1023,1250,1023,1252,1023,1255,1023,1258,1023,1261,1023,1263,1023,1267,1023,1269,1023,1272,1023,1274,1023,1277,1023,1280,1023,1284,1023,1286,1023,1290,1023,1292,1023,1294,1023,1296,1023,1299,1023,1302,1023,1305,1023,1307,1023,1310,1023,1312,1023,1314,1023,1316,1023,1318,1023,1321,1023,1325,1023,1327,1023,1331,1023,1333,1023,1335,1023,1337,1023,1339,1023,1342,1023,1346,1023,1348,1023,1351,1023,1353,1023,1356,1023,1358],{"viewBox":1182,"role":1017,"ariaLabelledBy":1183,"xmlns":1021,"style":1186},"221 0 317 224",[1184,1185],"wk-sheet-t","wk-sheet-d","width:100%;max-width:317px;height:auto;display:block;margin:1.5rem auto;font-family:Inter,ui-sans-serif,system-ui,sans-serif",[1025,1188,1189],{"id":1184},"The shaded orders log",[1029,1191,1192],{"id":1185},"Rows for Friday 28 August to Tuesday 1 September. Saturday 29 and Sunday 30 August are shaded grey as weekends. Monday 31 August is shaded orange as the late summer bank holiday, with only three orders.",[1033,1194],{"x":1195,"y":437,"width":1196,"height":1197,"fill":1038},"221","317","224",[1033,1199],{"x":1200,"y":1042,"width":1201,"height":1202,"rx":437,"fill":1136,"stroke":1089,"style":1203},"237.9","32.0","24.0","stroke-width:1px",[1033,1205],{"x":1206,"y":1042,"width":1207,"height":1202,"rx":437,"fill":1136,"stroke":1089,"style":1203},"269.9","118.2",[1061,1209,1213],{"x":1210,"y":1211,"style":1212},"329.0","33.0","font-size:11px;font-weight:600;fill:var(--muted,#5b6780);text-anchor:middle","A",[1033,1215],{"x":1216,"y":1042,"width":1217,"height":1202,"rx":437,"fill":1136,"stroke":1089,"style":1203},"388.1","61.2",[1061,1219,1221],{"x":1220,"y":1211,"style":1212},"418.7","B",[1033,1223],{"x":1224,"y":1042,"width":1225,"height":1202,"rx":437,"fill":1136,"stroke":1089,"style":1203},"449.3","72.8",[1061,1227,1229],{"x":1228,"y":1211,"style":1212},"485.7","C",[1033,1231],{"x":1200,"y":1232,"width":1201,"height":1233,"rx":437,"fill":1136,"stroke":1089,"style":1203},"40.0","28.0",[1061,1235,426],{"x":1236,"y":1237,"style":1212},"253.9","59.0",[1033,1239],{"x":1206,"y":1232,"width":1207,"height":1233,"rx":437,"fill":1046,"stroke":1047,"style":1240},"stroke-width:1.5px",[1061,1242,1244],{"x":1210,"y":1237,"style":1243},"font-size:10.5px;font-weight:700;fill:var(--brand-strong,#4338ca);text-anchor:middle","Date",[1033,1246],{"x":1216,"y":1232,"width":1217,"height":1233,"rx":437,"fill":1046,"stroke":1047,"style":1240},[1061,1248,1249],{"x":1220,"y":1237,"style":1243},"Orders",[1033,1251],{"x":1224,"y":1232,"width":1225,"height":1233,"rx":437,"fill":1046,"stroke":1047,"style":1240},[1061,1253,1254],{"x":1228,"y":1237,"style":1243},"Revenue",[1033,1256],{"x":1200,"y":1257,"width":1201,"height":1233,"rx":437,"fill":1136,"stroke":1089,"style":1203},"68.0",[1061,1259,416],{"x":1236,"y":1260,"style":1212},"87.0",[1033,1262],{"x":1206,"y":1257,"width":1207,"height":1233,"rx":437,"fill":1038,"stroke":1089,"style":1203},[1061,1264,1266],{"x":1210,"y":1260,"style":1265},"font-size:10.5px;font-weight:400;fill:var(--text,#172033);text-anchor:middle","Fri 28 Aug 2026",[1033,1268],{"x":1216,"y":1257,"width":1217,"height":1233,"rx":437,"fill":1038,"stroke":1089,"style":1203},[1061,1270,1271],{"x":1220,"y":1260,"style":1265},"43",[1033,1273],{"x":1224,"y":1257,"width":1225,"height":1233,"rx":437,"fill":1038,"stroke":1089,"style":1203},[1061,1275,1276],{"x":1228,"y":1260,"style":1265},"2,257.50",[1033,1278],{"x":1200,"y":1279,"width":1201,"height":1233,"rx":437,"fill":1136,"stroke":1089,"style":1203},"96.0",[1061,1281,1283],{"x":1236,"y":1282,"style":1212},"115.0","3",[1033,1285],{"x":1206,"y":1279,"width":1207,"height":1233,"rx":437,"fill":1136,"stroke":1089,"style":1240},[1061,1287,1289],{"x":1210,"y":1282,"style":1288},"font-size:10.5px;font-weight:700;fill:var(--text,#172033);text-anchor:middle","Sat 29 Aug 2026",[1033,1291],{"x":1216,"y":1279,"width":1217,"height":1233,"rx":437,"fill":1136,"stroke":1089,"style":1240},[1061,1293,1283],{"x":1220,"y":1282,"style":1288},[1033,1295],{"x":1224,"y":1279,"width":1225,"height":1233,"rx":437,"fill":1136,"stroke":1089,"style":1240},[1061,1297,1298],{"x":1228,"y":1282,"style":1288},"120.00",[1033,1300],{"x":1200,"y":1301,"width":1201,"height":1233,"rx":437,"fill":1136,"stroke":1089,"style":1203},"124.0",[1061,1303,1035],{"x":1236,"y":1304,"style":1212},"143.0",[1033,1306],{"x":1206,"y":1301,"width":1207,"height":1233,"rx":437,"fill":1136,"stroke":1089,"style":1240},[1061,1308,1309],{"x":1210,"y":1304,"style":1288},"Sun 30 Aug 2026",[1033,1311],{"x":1216,"y":1301,"width":1217,"height":1233,"rx":437,"fill":1136,"stroke":1089,"style":1240},[1061,1313,1283],{"x":1220,"y":1304,"style":1288},[1033,1315],{"x":1224,"y":1301,"width":1225,"height":1233,"rx":437,"fill":1136,"stroke":1089,"style":1240},[1061,1317,1298],{"x":1228,"y":1304,"style":1288},[1033,1319],{"x":1200,"y":1320,"width":1201,"height":1233,"rx":437,"fill":1136,"stroke":1089,"style":1203},"152.0",[1061,1322,1324],{"x":1236,"y":1323,"style":1212},"171.0","5",[1033,1326],{"x":1206,"y":1320,"width":1207,"height":1233,"rx":437,"fill":1102,"stroke":1103,"style":1240},[1061,1328,1330],{"x":1210,"y":1323,"style":1329},"font-size:10.5px;font-weight:700;fill:var(--gold-ink,#7a4e06);text-anchor:middle","Mon 31 Aug 2026",[1033,1332],{"x":1216,"y":1320,"width":1217,"height":1233,"rx":437,"fill":1102,"stroke":1103,"style":1240},[1061,1334,1283],{"x":1220,"y":1323,"style":1329},[1033,1336],{"x":1224,"y":1320,"width":1225,"height":1233,"rx":437,"fill":1102,"stroke":1103,"style":1240},[1061,1338,1298],{"x":1228,"y":1323,"style":1329},[1033,1340],{"x":1200,"y":1341,"width":1201,"height":1233,"rx":437,"fill":1136,"stroke":1089,"style":1203},"180.0",[1061,1343,1345],{"x":1236,"y":1344,"style":1212},"199.0","6",[1033,1347],{"x":1206,"y":1341,"width":1207,"height":1233,"rx":437,"fill":1038,"stroke":1089,"style":1203},[1061,1349,1350],{"x":1210,"y":1344,"style":1265},"Tue 01 Sep 2026",[1033,1352],{"x":1216,"y":1341,"width":1217,"height":1233,"rx":437,"fill":1038,"stroke":1089,"style":1203},[1061,1354,1355],{"x":1220,"y":1344,"style":1265},"46",[1033,1357],{"x":1224,"y":1341,"width":1225,"height":1233,"rx":437,"fill":1038,"stroke":1089,"style":1203},[1061,1359,1360],{"x":1228,"y":1344,"style":1265},"2,415.00",[29,1362,1364],{"id":1363},"step-4-the-same-rules-across-a-row-of-dates","Step 4 — The same rules across a row of dates",[10,1366,1367,1368,1371],{},"Planners and Gantt-style sheets put dates across the top and people or tasks down the side. The rules are the same, with the anchoring turned round: fix the ",[844,1369,1370],{},"row"," of the date header and let the column move:",[34,1373,1375],{"className":80,"code":1374,"language":82,"meta":39,"style":39},"plan = wb.create_sheet(\"Plan\")\nplan[\"A1\"] = \"Person\"\nfor i in range(21):\n    plan.cell(1, 2 + i, start + timedelta(days=i)).number_format = \"dd\"\nfor r, person in enumerate([\"Ana\", \"Ben\", \"Chloé\"], start=2):\n    plan.cell(r, 1, person)\nlast_col = plan.cell(1, 22).column_letter\nplan.conditional_formatting.add(f\"B1:{last_col}4\", FormulaRule(\n    formula=[\"COUNTIF(Holidays!$A$2:$A$200,B$1)>0\"], fill=holiday_fill, stopIfTrue=True))\nplan.conditional_formatting.add(f\"B1:{last_col}4\", FormulaRule(formula=[\"WEEKDAY(B$1,2)>5\"], fill=weekend_fill))\nfor col in range(2, 23):\n    plan.column_dimensions[plan.cell(1, col).column_letter].width = 4\nwb.save(\"orders_shaded.xlsx\")\nprint(\"plan rules on\", f\"B1:{last_col}4\")\n",[14,1376,1377,1391,1407,1423,1455,1494,1504,1524,1547,1576,1613,1635,1650,1658],{"__ignoreMap":39},[43,1378,1379,1382,1384,1386,1389],{"class":45,"line":46},[43,1380,1381],{"class":93},"plan ",[43,1383,149],{"class":89},[43,1385,478],{"class":93},[43,1387,1388],{"class":53},"\"Plan\"",[43,1390,225],{"class":93},[43,1392,1393,1396,1399,1402,1404],{"class":45,"line":103},[43,1394,1395],{"class":93},"plan[",[43,1397,1398],{"class":53},"\"A1\"",[43,1400,1401],{"class":93},"] ",[43,1403,149],{"class":89},[43,1405,1406],{"class":53}," \"Person\"\n",[43,1408,1409,1411,1413,1415,1417,1419,1421],{"class":45,"line":110},[43,1410,231],{"class":89},[43,1412,234],{"class":93},[43,1414,237],{"class":89},[43,1416,240],{"class":211},[43,1418,243],{"class":93},[43,1420,246],{"class":211},[43,1422,249],{"class":93},[43,1424,1425,1428,1430,1432,1434,1436,1439,1441,1443,1445,1447,1450,1452],{"class":45,"line":123},[43,1426,1427],{"class":93},"    plan.cell(",[43,1429,426],{"class":211},[43,1431,186],{"class":93},[43,1433,416],{"class":211},[43,1435,328],{"class":89},[43,1437,1438],{"class":93}," i, start ",[43,1440,263],{"class":89},[43,1442,266],{"class":93},[43,1444,270],{"class":269},[43,1446,149],{"class":89},[43,1448,1449],{"class":93},"i)).number_format ",[43,1451,149],{"class":89},[43,1453,1454],{"class":53}," \"dd\"\n",[43,1456,1457,1459,1462,1464,1467,1470,1473,1475,1478,1480,1483,1485,1488,1490,1492],{"class":45,"line":136},[43,1458,231],{"class":89},[43,1460,1461],{"class":93}," r, person ",[43,1463,237],{"class":89},[43,1465,1466],{"class":211}," enumerate",[43,1468,1469],{"class":93},"([",[43,1471,1472],{"class":53},"\"Ana\"",[43,1474,186],{"class":93},[43,1476,1477],{"class":53},"\"Ben\"",[43,1479,186],{"class":93},[43,1481,1482],{"class":53},"\"Chloé\"",[43,1484,782],{"class":93},[43,1486,1487],{"class":269},"start",[43,1489,149],{"class":89},[43,1491,416],{"class":211},[43,1493,249],{"class":93},[43,1495,1496,1499,1501],{"class":45,"line":143},[43,1497,1498],{"class":93},"    plan.cell(r, ",[43,1500,426],{"class":211},[43,1502,1503],{"class":93},", person)\n",[43,1505,1506,1509,1511,1514,1516,1518,1521],{"class":45,"line":155},[43,1507,1508],{"class":93},"last_col ",[43,1510,149],{"class":89},[43,1512,1513],{"class":93}," plan.cell(",[43,1515,426],{"class":211},[43,1517,186],{"class":93},[43,1519,1520],{"class":211},"22",[43,1522,1523],{"class":93},").column_letter\n",[43,1525,1526,1529,1531,1534,1536,1539,1541,1544],{"class":45,"line":166},[43,1527,1528],{"class":93},"plan.conditional_formatting.add(",[43,1530,923],{"class":89},[43,1532,1533],{"class":53},"\"B1:",[43,1535,930],{"class":929},[43,1537,1538],{"class":93},"last_col",[43,1540,936],{"class":929},[43,1542,1543],{"class":53},"4\"",[43,1545,1546],{"class":93},", FormulaRule(\n",[43,1548,1549,1552,1554,1556,1559,1561,1563,1565,1568,1570,1572,1574],{"class":45,"line":177},[43,1550,1551],{"class":269},"    formula",[43,1553,149],{"class":89},[43,1555,532],{"class":93},[43,1557,1558],{"class":53},"\"COUNTIF(Holidays!$A$2:$A$200,B$1)>0\"",[43,1560,782],{"class":93},[43,1562,785],{"class":269},[43,1564,149],{"class":89},[43,1566,1567],{"class":93},"holiday_fill, ",[43,1569,909],{"class":269},[43,1571,149],{"class":89},[43,1573,615],{"class":211},[43,1575,809],{"class":93},[43,1577,1578,1580,1582,1584,1586,1588,1590,1592,1595,1597,1599,1601,1604,1606,1608,1610],{"class":45,"line":200},[43,1579,1528],{"class":93},[43,1581,923],{"class":89},[43,1583,1533],{"class":53},[43,1585,930],{"class":929},[43,1587,1538],{"class":93},[43,1589,936],{"class":929},[43,1591,1543],{"class":53},[43,1593,1594],{"class":93},", FormulaRule(",[43,1596,772],{"class":269},[43,1598,149],{"class":89},[43,1600,532],{"class":93},[43,1602,1603],{"class":53},"\"WEEKDAY(B$1,2)>5\"",[43,1605,782],{"class":93},[43,1607,785],{"class":269},[43,1609,149],{"class":89},[43,1611,1612],{"class":93},"weekend_fill))\n",[43,1614,1615,1617,1620,1622,1624,1626,1628,1630,1633],{"class":45,"line":228},[43,1616,231],{"class":89},[43,1618,1619],{"class":93}," col ",[43,1621,237],{"class":89},[43,1623,240],{"class":211},[43,1625,243],{"class":93},[43,1627,416],{"class":211},[43,1629,186],{"class":93},[43,1631,1632],{"class":211},"23",[43,1634,249],{"class":93},[43,1636,1637,1640,1642,1645,1647],{"class":45,"line":252},[43,1638,1639],{"class":93},"    plan.column_dimensions[plan.cell(",[43,1641,426],{"class":211},[43,1643,1644],{"class":93},", col).column_letter].width ",[43,1646,149],{"class":89},[43,1648,1649],{"class":211}," 4\n",[43,1651,1652,1654,1656],{"class":45,"line":278},[43,1653,966],{"class":93},[43,1655,969],{"class":53},[43,1657,225],{"class":93},[43,1659,1660,1662,1664,1667,1669,1671,1673,1675,1677,1679,1681],{"class":45,"line":319},[43,1661,623],{"class":211},[43,1663,243],{"class":93},[43,1665,1666],{"class":53},"\"plan rules on\"",[43,1668,186],{"class":93},[43,1670,923],{"class":89},[43,1672,1533],{"class":53},[43,1674,930],{"class":929},[43,1676,1538],{"class":93},[43,1678,936],{"class":929},[43,1680,1543],{"class":53},[43,1682,225],{"class":93},[10,1684,1685,1688,1689,1692,1693,1697],{},[14,1686,1687],{},"B$1"," fixes row 1 and leaves the column relative, so every cell in a column tests that column's date — whole columns are shaded for weekends and the holiday, from the header down through every person's row. It is the same idea as Step 2, transposed. The narrow columns with a ",[14,1690,1691],{},"dd"," format make a compact timeline; the ",[23,1694,1696],{"href":1695},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-charts-in-excel-with-openpyxl\u002Fcreate-a-gantt-chart-in-excel-with-python\u002F","Create a Gantt Chart in Excel with Python"," page builds a fuller version.",[1014,1699,1023,1704,1023,1707,1023,1710,1023,1713,1023,1718,1023,1725,1023,1731,1023,1736,1023,1741,1023,1745,1023,1749,1023,1752,1023,1757,1023,1762,1023,1766,1023,1769,1023,1772],{"viewBox":1700,"role":1017,"ariaLabelledBy":1701,"xmlns":1021,"style":1022},"4 0 752 207",[1702,1703],"wk-anchor-t","wk-anchor-d",[1025,1705,1706],{"id":1702},"Anchoring for a date column versus a date row",[1029,1708,1709],{"id":1703},"When dates run down column A, the rule uses $A2 so every cell in a row checks that row's date. When dates run across row 1, the rule uses B$1 so every cell in a column checks that column's date.",[1033,1711],{"x":1035,"y":437,"width":1036,"height":1712,"fill":1038},"207",[1033,1714],{"x":1098,"y":1042,"width":1715,"height":1716,"rx":1717,"fill":1046,"stroke":1047,"style":1048},"351.0","175.0","14",[1050,1719,1721],{"transform":1720},"translate(182.5,29.0) scale(1.083)",[1054,1722],{"d":1723,"fill":1057,"stroke":1058,"style":1724},"M3 5h18v14H3z M3 10h18 M3 15h18 M9 5v14","stroke-width:1.66px;stroke-linecap:round;stroke-linejoin:round",[1061,1726,1730],{"x":1727,"y":1728,"style":1729},"195.5","78.0","font-size:14px;font-weight:700;fill:var(--brand-strong,#4338ca);text-anchor:middle","dates down a column",[45,1732],{"x1":1733,"y1":1734,"x2":1735,"y2":1734,"stroke":1047,"style":1203},"36.0","91.0","355.0",[1061,1737,1740],{"x":1727,"y":1738,"style":1739},"111.0","font-size:12px;font-weight:400;fill:var(--text,#172033);text-anchor:middle","rule: WEEKDAY($A2,2)>5",[1061,1742,1744],{"x":1727,"y":1743,"style":1739},"137.0","column fixed, row relative",[1061,1746,1748],{"x":1727,"y":1747,"style":1739},"163.0","whole rows shaded",[1033,1750],{"x":1751,"y":1042,"width":1715,"height":1716,"rx":1717,"fill":1166,"stroke":1167,"style":1048},"389.0",[1050,1753,1755],{"transform":1754},"translate(551.5,29.0) scale(1.083)",[1054,1756],{"d":1056,"fill":1057,"stroke":1174,"style":1724},[1061,1758,1761],{"x":1759,"y":1728,"style":1760},"564.5","font-size:14px;font-weight:700;fill:var(--teal-ink,#0b6157);text-anchor:middle","dates across a row",[45,1763],{"x1":1764,"y1":1734,"x2":1765,"y2":1734,"stroke":1167,"style":1203},"405.0","724.0",[1061,1767,1768],{"x":1759,"y":1738,"style":1739},"rule: WEEKDAY(B$1,2)>5",[1061,1770,1771],{"x":1759,"y":1743,"style":1739},"row fixed, column relative",[1061,1773,1774],{"x":1759,"y":1747,"style":1739},"whole columns shaded",[29,1776,1778],{"id":1777},"step-5-check-which-dates-each-rule-catches","Step 5 — Check which dates each rule catches",[10,1780,1781],{},"Python cannot see conditional formatting, but it can recalculate the rules' formulas in helper cells and compare the result with the calendar and the holiday list:",[34,1783,1785],{"className":80,"code":1784,"language":82,"meta":39,"style":39},"import subprocess\nfrom openpyxl import load_workbook\n\nchk = load_workbook(\"orders_shaded.xlsx\")\nws = chk[\"Orders\"]\nws[\"E1\"], ws[\"F1\"] = \"Holiday?\", \"Weekend?\"\nfor r in range(2, last + 1):\n    ws[f\"E{r}\"] = f\"=COUNTIF(Holidays!$A$2:$A$200,$A{r})>0\"\n    ws[f\"F{r}\"] = f\"=WEEKDAY($A{r},2)>5\"\nchk.save(\"orders_check.xlsx\")\nsubprocess.run([\"soffice\", \"--headless\", \"--convert-to\", \"xlsx\", \"--outdir\", \"calc\", \"orders_check.xlsx\"],\n               check=True, capture_output=True)\ncalc = load_workbook(\"calc\u002Forders_check.xlsx\", data_only=True)[\"Orders\"]\nuk = holidays.UK(subdiv=\"ENG\", years=2026)\nfor r in range(2, last + 1):\n    d = calc[f\"A{r}\"].value.date()\n    shown = \"holiday\" if calc[f\"E{r}\"].value else \"weekend\" if calc[f\"F{r}\"].value else \"\"\n    expected = \"holiday\" if d in uk else \"weekend\" if d.weekday() >= 5 else \"\"\n    if shown or expected:\n        print(d.strftime(\"%a %d %b\"), shown, \"✓\" if shown == expected else f\"✗ expected {expected}\")\n",[14,1786,1787,1794,1805,1809,1823,1838,1864,1887,1925,1960,1970,2010,2030,2058,2084,2106,2131,2188,2224,2238],{"__ignoreMap":39},[43,1788,1789,1791],{"class":45,"line":46},[43,1790,97],{"class":89},[43,1792,1793],{"class":93}," subprocess\n",[43,1795,1796,1798,1800,1802],{"class":45,"line":103},[43,1797,90],{"class":89},[43,1799,115],{"class":93},[43,1801,97],{"class":89},[43,1803,1804],{"class":93}," load_workbook\n",[43,1806,1807],{"class":45,"line":110},[43,1808,140],{"emptyLinePlaceholder":139},[43,1810,1811,1814,1816,1819,1821],{"class":45,"line":123},[43,1812,1813],{"class":93},"chk ",[43,1815,149],{"class":89},[43,1817,1818],{"class":93}," load_workbook(",[43,1820,969],{"class":53},[43,1822,225],{"class":93},[43,1824,1825,1828,1830,1833,1835],{"class":45,"line":136},[43,1826,1827],{"class":93},"ws ",[43,1829,149],{"class":89},[43,1831,1832],{"class":93}," chk[",[43,1834,189],{"class":53},[43,1836,1837],{"class":93},"]\n",[43,1839,1840,1843,1846,1849,1852,1854,1856,1859,1861],{"class":45,"line":143},[43,1841,1842],{"class":93},"ws[",[43,1844,1845],{"class":53},"\"E1\"",[43,1847,1848],{"class":93},"], ws[",[43,1850,1851],{"class":53},"\"F1\"",[43,1853,1401],{"class":93},[43,1855,149],{"class":89},[43,1857,1858],{"class":53}," \"Holiday?\"",[43,1860,186],{"class":93},[43,1862,1863],{"class":53},"\"Weekend?\"\n",[43,1865,1866,1868,1870,1872,1874,1876,1878,1881,1883,1885],{"class":45,"line":155},[43,1867,231],{"class":89},[43,1869,993],{"class":93},[43,1871,237],{"class":89},[43,1873,240],{"class":211},[43,1875,243],{"class":93},[43,1877,416],{"class":211},[43,1879,1880],{"class":93},", last ",[43,1882,263],{"class":89},[43,1884,632],{"class":211},[43,1886,249],{"class":93},[43,1888,1889,1892,1894,1897,1899,1902,1904,1906,1908,1910,1913,1916,1918,1920,1922],{"class":45,"line":166},[43,1890,1891],{"class":93},"    ws[",[43,1893,923],{"class":89},[43,1895,1896],{"class":53},"\"E",[43,1898,930],{"class":929},[43,1900,1901],{"class":93},"r",[43,1903,936],{"class":929},[43,1905,939],{"class":53},[43,1907,1401],{"class":93},[43,1909,149],{"class":89},[43,1911,1912],{"class":89}," f",[43,1914,1915],{"class":53},"\"=COUNTIF(Holidays!$A$2:$A$200,$A",[43,1917,930],{"class":929},[43,1919,1901],{"class":93},[43,1921,936],{"class":929},[43,1923,1924],{"class":53},")>0\"\n",[43,1926,1927,1929,1931,1934,1936,1938,1940,1942,1944,1946,1948,1951,1953,1955,1957],{"class":45,"line":177},[43,1928,1891],{"class":93},[43,1930,923],{"class":89},[43,1932,1933],{"class":53},"\"F",[43,1935,930],{"class":929},[43,1937,1901],{"class":93},[43,1939,936],{"class":929},[43,1941,939],{"class":53},[43,1943,1401],{"class":93},[43,1945,149],{"class":89},[43,1947,1912],{"class":89},[43,1949,1950],{"class":53},"\"=WEEKDAY($A",[43,1952,930],{"class":929},[43,1954,1901],{"class":93},[43,1956,936],{"class":929},[43,1958,1959],{"class":53},",2)>5\"\n",[43,1961,1962,1965,1968],{"class":45,"line":200},[43,1963,1964],{"class":93},"chk.save(",[43,1966,1967],{"class":53},"\"orders_check.xlsx\"",[43,1969,225],{"class":93},[43,1971,1972,1975,1978,1980,1983,1985,1988,1990,1993,1995,1998,2000,2003,2005,2007],{"class":45,"line":228},[43,1973,1974],{"class":93},"subprocess.run([",[43,1976,1977],{"class":53},"\"soffice\"",[43,1979,186],{"class":93},[43,1981,1982],{"class":53},"\"--headless\"",[43,1984,186],{"class":93},[43,1986,1987],{"class":53},"\"--convert-to\"",[43,1989,186],{"class":93},[43,1991,1992],{"class":53},"\"xlsx\"",[43,1994,186],{"class":93},[43,1996,1997],{"class":53},"\"--outdir\"",[43,1999,186],{"class":93},[43,2001,2002],{"class":53},"\"calc\"",[43,2004,186],{"class":93},[43,2006,1967],{"class":53},[43,2008,2009],{"class":93},"],\n",[43,2011,2012,2015,2017,2019,2021,2024,2026,2028],{"class":45,"line":252},[43,2013,2014],{"class":269},"               check",[43,2016,149],{"class":89},[43,2018,615],{"class":211},[43,2020,186],{"class":93},[43,2022,2023],{"class":269},"capture_output",[43,2025,149],{"class":89},[43,2027,615],{"class":211},[43,2029,225],{"class":93},[43,2031,2032,2035,2037,2039,2042,2044,2047,2049,2051,2054,2056],{"class":45,"line":278},[43,2033,2034],{"class":93},"calc ",[43,2036,149],{"class":89},[43,2038,1818],{"class":93},[43,2040,2041],{"class":53},"\"calc\u002Forders_check.xlsx\"",[43,2043,186],{"class":93},[43,2045,2046],{"class":269},"data_only",[43,2048,149],{"class":89},[43,2050,615],{"class":211},[43,2052,2053],{"class":93},")[",[43,2055,189],{"class":53},[43,2057,1837],{"class":93},[43,2059,2060,2063,2065,2068,2070,2072,2074,2076,2078,2080,2082],{"class":45,"line":319},[43,2061,2062],{"class":93},"uk ",[43,2064,149],{"class":89},[43,2066,2067],{"class":93}," holidays.UK(",[43,2069,517],{"class":269},[43,2071,149],{"class":89},[43,2073,522],{"class":53},[43,2075,186],{"class":93},[43,2077,527],{"class":269},[43,2079,149],{"class":89},[43,2081,212],{"class":211},[43,2083,225],{"class":93},[43,2085,2086,2088,2090,2092,2094,2096,2098,2100,2102,2104],{"class":45,"line":398},[43,2087,231],{"class":89},[43,2089,993],{"class":93},[43,2091,237],{"class":89},[43,2093,240],{"class":211},[43,2095,243],{"class":93},[43,2097,416],{"class":211},[43,2099,1880],{"class":93},[43,2101,263],{"class":89},[43,2103,632],{"class":211},[43,2105,249],{"class":93},[43,2107,2108,2110,2112,2115,2117,2120,2122,2124,2126,2128],{"class":45,"line":431},[43,2109,255],{"class":93},[43,2111,149],{"class":89},[43,2113,2114],{"class":93}," calc[",[43,2116,923],{"class":89},[43,2118,2119],{"class":53},"\"A",[43,2121,930],{"class":929},[43,2123,1901],{"class":93},[43,2125,936],{"class":929},[43,2127,939],{"class":53},[43,2129,2130],{"class":93},"].value.date()\n",[43,2132,2133,2136,2138,2141,2143,2145,2147,2149,2151,2153,2155,2157,2160,2162,2165,2167,2169,2171,2173,2175,2177,2179,2181,2183,2185],{"class":45,"line":448},[43,2134,2135],{"class":93},"    shown ",[43,2137,149],{"class":89},[43,2139,2140],{"class":53}," \"holiday\"",[43,2142,349],{"class":89},[43,2144,2114],{"class":93},[43,2146,923],{"class":89},[43,2148,1896],{"class":53},[43,2150,930],{"class":929},[43,2152,1901],{"class":93},[43,2154,936],{"class":929},[43,2156,939],{"class":53},[43,2158,2159],{"class":93},"].value ",[43,2161,355],{"class":89},[43,2163,2164],{"class":53}," \"weekend\"",[43,2166,349],{"class":89},[43,2168,2114],{"class":93},[43,2170,923],{"class":89},[43,2172,1933],{"class":53},[43,2174,930],{"class":929},[43,2176,1901],{"class":93},[43,2178,936],{"class":929},[43,2180,939],{"class":53},[43,2182,2159],{"class":93},[43,2184,355],{"class":89},[43,2186,2187],{"class":53}," \"\"\n",[43,2189,2190,2193,2195,2197,2199,2201,2203,2206,2208,2210,2212,2214,2217,2219,2222],{"class":45,"line":465},[43,2191,2192],{"class":93},"    expected ",[43,2194,149],{"class":89},[43,2196,2140],{"class":53},[43,2198,349],{"class":89},[43,2200,298],{"class":93},[43,2202,237],{"class":89},[43,2204,2205],{"class":93}," uk ",[43,2207,355],{"class":89},[43,2209,2164],{"class":53},[43,2211,349],{"class":89},[43,2213,286],{"class":93},[43,2215,2216],{"class":89},">=",[43,2218,292],{"class":211},[43,2220,2221],{"class":89}," else",[43,2223,2187],{"class":53},[43,2225,2226,2229,2232,2235],{"class":45,"line":470},[43,2227,2228],{"class":89},"    if",[43,2230,2231],{"class":93}," shown ",[43,2233,2234],{"class":89},"or",[43,2236,2237],{"class":93}," expected:\n",[43,2239,2240,2243,2246,2248,2251,2254,2257,2259,2262,2265,2267,2269,2272,2275,2277,2279,2282,2284,2287,2289,2291],{"class":45,"line":486},[43,2241,2242],{"class":211},"        print",[43,2244,2245],{"class":93},"(d.strftime(",[43,2247,939],{"class":53},[43,2249,2250],{"class":929},"%a",[43,2252,2253],{"class":929}," %d",[43,2255,2256],{"class":929}," %b",[43,2258,939],{"class":53},[43,2260,2261],{"class":93},"), shown, ",[43,2263,2264],{"class":53},"\"✓\"",[43,2266,349],{"class":89},[43,2268,2231],{"class":93},[43,2270,2271],{"class":89},"==",[43,2273,2274],{"class":93}," expected ",[43,2276,355],{"class":89},[43,2278,1912],{"class":89},[43,2280,2281],{"class":53},"\"✗ expected ",[43,2283,930],{"class":929},[43,2285,2286],{"class":93},"expected",[43,2288,936],{"class":929},[43,2290,939],{"class":53},[43,2292,225],{"class":93},[10,2294,2295,2296,2298,2299,2302,2303,2306],{},"Every Saturday and Sunday in the three weeks is caught by the weekend rule, and Monday 31 August by the holiday rule, matching Python's own calendar and the ",[14,2297,20],{}," package. Note that ",[14,2300,2301],{},"d.weekday() >= 5"," is Python's numbering (Monday = 0), while Excel's ",[14,2304,2305],{},"WEEKDAY(..., 2) > 5"," uses Monday = 1 — two different conventions that agree on which days are weekends, which is exactly what this check confirms. Running it on a copy keeps the delivered workbook free of helper columns.",[29,2308,2310],{"id":2309},"common-pitfalls","Common pitfalls",[2312,2313,2314,2324,2336,2342,2348],"ul",{},[2315,2316,2317,2323],"li",{},[2318,2319,2320,2322],"strong",{},[14,2321,16],{}," without the second argument."," The default numbering starts on Sunday; use return type 2.",[2315,2325,2326,2329,2330,2332,2333,2335],{},[2318,2327,2328],{},"Dates stored as text."," Neither ",[14,2331,16],{}," nor ",[14,2334,1007],{}," against real dates will work.",[2315,2337,2338,2341],{},[2318,2339,2340],{},"Weekend rule before the holiday rule."," A weekday holiday then looks ordinary; put holidays first with stop-if-true.",[2315,2343,2344,2347],{},[2318,2345,2346],{},"Holiday lists for one year only."," Generate several years and leave room in the rule's range.",[2315,2349,2350,2353,2354,2356],{},[2318,2351,2352],{},"Wrong anchoring for date headers."," Use ",[14,2355,1687],{}," when dates run across a row.",[29,2358,2360],{"id":2359},"conclusion","Conclusion",[10,2362,2363,2364,2366,2367,2369,2370,2373,2374,2376],{},"To shade weekends and holidays, add two formula rules to the date range: a holiday rule first — ",[14,2365,1007],{}," against a holiday sheet generated with the ",[14,2368,20],{}," package, with stop-if-true — and a weekend rule ",[14,2371,2372],{},"WEEKDAY($A2,2)>5"," after it. For dates across a header row, the same rules use ",[14,2375,1687],{}," instead. Keep the dates real dates on both sheets, leave room in the holiday range for future years, and check the rules by recalculating their formulas in helper cells against Python's own calendar.",[29,2378,2380],{"id":2379},"frequently-asked-questions","Frequently asked questions",[10,2382,2383,2386],{},[2318,2384,2385],{},"How do I highlight weekends in Excel with openpyxl?","\nAdd a FormulaRule with WEEKDAY($A2,2)>5 to the data range. Return type 2 numbers Monday as 1 and Sunday as 7, so values above 5 are Saturday and Sunday.",[10,2388,2389,2392],{},[2318,2390,2391],{},"How do I highlight public holidays in Excel with Python?","\nWrite the holiday dates to a sheet, for example from the holidays package, and add a FormulaRule with COUNTIF of that range against the row's date greater than 0.",[10,2394,2395,2398],{},[2318,2396,2397],{},"Why does my weekend rule highlight Thursdays and Fridays?","\nWEEKDAY without a second argument numbers Sunday as 1 and Saturday as 7, so the test for values above 5 picks Thursday and Friday. Use WEEKDAY(date,2).",[10,2400,2401,2404],{},[2318,2402,2403],{},"How do I make holidays take priority over weekends?","\nAdd the holiday rule before the weekend rule and set stopIfTrue on it, so dates matching the holiday rule do not get the weekend format.",[29,2406,2408],{"id":2407},"related","Related",[2312,2410,2411,2417,2424,2431],{},[2315,2412,2413,2414,2416],{},"Up one level: ",[23,2415,26],{"href":25}," — rule-based formatting.",[2315,2418,2419,2423],{},[23,2420,2422],{"href":2421},"\u002Fadvanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Fhighlight-overdue-dates-with-openpyxl\u002F","Highlight Overdue Dates with openpyxl"," — another date rule.",[2315,2425,2426,2430],{},[23,2427,2429],{"href":2428},"\u002Fadvanced-data-transformation-and-cleaning\u002Fworking-with-dates-and-times-in-excel-data\u002Fflag-public-holidays-in-excel-data-with-python\u002F","Flag Public Holidays in Excel Data with Python"," — holidays as data in pandas.",[2315,2432,2433,2437],{},[23,2434,2436],{"href":2435},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fstyling-excel-cells-with-openpyxl\u002Fbuild-a-calendar-sheet-in-excel-with-python\u002F","Build a Calendar Sheet in Excel with Python"," — a full calendar layout.",[2439,2440,2441],"style",{},"html pre.shiki code .sMTad, html code.shiki .sMTad{--shiki-default:#6F42C1;--shiki-dark:#FFB757}html pre.shiki code .srMev, html code.shiki .srMev{--shiki-default:#032F62;--shiki-dark:#ADDCFF}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s-kum, html code.shiki .s-kum{--shiki-default:#D73A49;--shiki-dark:#FF9492}html pre.shiki code .skGVy, html code.shiki .skGVy{--shiki-default:#24292E;--shiki-dark:#F0F3F6}html pre.shiki code .sP0c6, html code.shiki .sP0c6{--shiki-default:#005CC5;--shiki-dark:#91CBFF}html pre.shiki code .sa561, html code.shiki .sa561{--shiki-default:#E36209;--shiki-dark:#FFB757}html pre.shiki code .sSjpA, html code.shiki .sSjpA{--shiki-default:#005CC5;--shiki-dark:#FF9492}",{"title":39,"searchDepth":103,"depth":103,"links":2443},[2444,2445,2446,2447,2448,2449,2450,2451,2452,2453],{"id":31,"depth":103,"text":32},{"id":73,"depth":103,"text":74},{"id":659,"depth":103,"text":660},{"id":838,"depth":103,"text":839},{"id":1363,"depth":103,"text":1364},{"id":1777,"depth":103,"text":1778},{"id":2309,"depth":103,"text":2310},{"id":2359,"depth":103,"text":2360},{"id":2379,"depth":103,"text":2380},{"id":2407,"depth":103,"text":2408},"2026-10-02","Shade weekend and public-holiday rows in an Excel log or timeline with openpyxl conditional formatting: WEEKDAY-based rules for Saturdays and Sundays, a holiday list generated with the holidays package on its own sheet, rule order so holidays win, the same rules across a date header row for planners, and a recalculated check of which dates each rule catches.","md",[2458,2460,2462,2464],{"q":2385,"a":2459},"Add a FormulaRule with WEEKDAY($A2,2)>5 to the data range. Return type 2 numbers Monday as 1 and Sunday as 7, so values above 5 are Saturday and Sunday.",{"q":2391,"a":2461},"Write the holiday dates to a sheet, for example from the holidays package, and add a FormulaRule with COUNTIF of that range against the row's date greater than 0.",{"q":2397,"a":2463},"WEEKDAY without a second argument numbers Sunday as 1 and Saturday as 7, so the test for values above 5 picks Thursday and Friday. Use WEEKDAY(date,2).",{"q":2403,"a":2465},"Add the holiday rule before the weekend rule and set stopIfTrue on it, so dates matching the holiday rule do not get the weekend format.","highlight weekends and holidays in a date column",null,{"breadcrumb":2469},[2470,2473,2476],{"name":2471,"item":2472},"Home","\u002F",{"name":2474,"item":2475},"Advanced Data Transformation and Cleaning for Excel Automation","\u002Fadvanced-data-transformation-and-cleaning\u002F",{"name":2477,"item":25},"Applying Conditional Formatting With openpyxl","\u002Fadvanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Fhighlight-weekends-and-holidays-in-a-date-column",{"title":2480,"description":2481},"Highlight Weekends and Holidays in Excel with openpyxl","Conditional formatting for dates: WEEKDAY($A2,2)>5 for weekends, COUNTIF against a holiday sheet built with the holidays library, stop-if-true ordering, column-relative rules for date headers and a recalculated check.","highlight-weekends-and-holidays-in-a-date-column","advanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Fhighlight-weekends-and-holidays-in-a-date-column\u002Findex",[2485,2486],"conditional-formatting","dates-and-times","how-to","eu6HrbqSS9AXm9LF7xtMLs_chfE2Et7ZTIA17Yu3CQc",[2490,2494],{"title":2491,"path":2492,"stem":2493,"children":-1},"Highlight Values Outside a Tolerance of Target with openpyxl","\u002Fadvanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Fhighlight-values-outside-a-tolerance-of-target-with-openpyxl","advanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Fhighlight-values-outside-a-tolerance-of-target-with-openpyxl\u002Findex",{"title":2495,"path":2496,"stem":2497,"children":-1},"List and Remove Conditional Formatting with openpyxl","\u002Fadvanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Flist-and-remove-conditional-formatting-with-openpyxl","advanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Flist-and-remove-conditional-formatting-with-openpyxl\u002Findex",[2499,2501],{"path":2500,"title":2477},"\u002Fadvanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl",{"path":2502,"title":2474},"\u002Fadvanced-data-transformation-and-cleaning",[],[2505,2508,2511,2514,2517,2520],{"path":2506,"title":2507,"kind":2487},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fbuilding-excel-reports-with-xlsxwriter\u002Fapply-conditional-formatting-with-xlsxwriter","Apply Conditional Formatting with xlsxwriter",{"path":2509,"title":2510,"kind":2487},"\u002Fadvanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Fadd-data-bars-and-colour-scales-with-openpyxl","Add Data Bars and Colour Scales with openpyxl",{"path":2512,"title":2513,"kind":2487},"\u002Fadvanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Fadd-icon-sets-with-openpyxl","Add Icon Sets to Excel Cells with openpyxl",{"path":2515,"title":2516,"kind":2487},"\u002Fadvanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Fapply-a-colour-scale-per-row-or-per-column-with-openpyxl","Apply a Colour Scale per Row or per Column with openpyxl",{"path":2518,"title":2519,"kind":2487},"\u002Fadvanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Fapply-conditional-formatting-to-an-excel-table-that-grows","Apply Conditional Formatting to an Excel Table That Grows",{"path":2521,"title":1012,"kind":2487},"\u002Fadvanced-data-transformation-and-cleaning\u002Fapplying-conditional-formatting-with-openpyxl\u002Fcontrol-conditional-formatting-rule-order-and-stop-if-true",1790972078384]