[{"data":1,"prerenderedAt":2547},["ShallowReactive",2],{"doc:\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fconvert-an-excel-table-back-to-a-normal-range":3,"surround:\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fconvert-an-excel-table-back-to-a-normal-range":2513,"ancestors:\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fconvert-an-excel-table-back-to-a-normal-range":2522,"children:\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fconvert-an-excel-table-back-to-a-normal-range":2527,"related:\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fconvert-an-excel-table-back-to-a-normal-range":2528},{"id":4,"title":5,"body":6,"dateModified":2479,"datePublished":2479,"description":2480,"extension":2481,"faq":2482,"keyword":2491,"kind":2492,"meta":2493,"navigation":232,"path":2502,"seo":2503,"slug":2506,"stem":2507,"topics":2508,"type":2511,"__hash__":2512},"docs\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fconvert-an-excel-table-back-to-a-normal-range\u002Findex.md","Convert an Excel Table Back to a Normal Range",{"type":7,"value":8,"toc":2466},"minimark",[9,29,34,59,81,193,197,204,341,351,408,575,578,582,585,1266,1301,1305,1469,1472,1825,1831,1835,1842,2059,2067,2195,2199,2202,2242,2309,2317,2321,2329,2333,2376,2380,2393,2397,2407,2417,2423,2429,2433,2462],[10,11,12,13,17,18,22,23,28],"p",{},"Excel tables — the objects created with Ctrl+T — are excellent for data entry and analysis, but some destinations do not want them: an older import tool that chokes on the table XML, a template that must be a plain grid, a sheet about to be restructured in ways a table will not allow, like merging cells in the header. Excel's ",[14,15,16],"em",{},"Convert to Range"," command removes the table and quietly rewrites every formula that used structured references such as ",[19,20,21],"code",{},"Sales[Amount]"," into ordinary cell references. openpyxl can remove the table in one line, but it does not rewrite anything, so those formulas break. This page, part of ",[24,25,27],"a",{"href":26},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002F","Creating Excel Tables and Autofilters with Python",", does the full conversion.",[30,31,33],"h2",{"id":32},"prerequisites","Prerequisites",[35,36,41],"pre",{"className":37,"code":38,"language":39,"meta":40,"style":40},"language-bash shiki shiki-themes github-light github-dark-high-contrast","pip install openpyxl\n","bash","",[19,42,43],{"__ignoreMap":40},[44,45,48,52,56],"span",{"class":46,"line":47},"line",1,[44,49,51],{"class":50},"sMTad","pip",[44,53,55],{"class":54},"srMev"," install",[44,57,58],{"class":54}," openpyxl\n",[10,60,61,64,65,68,69,72,73,76,77,80],{},[19,62,63],{},"orders_table.xlsx"," has a table called ",[19,66,67],{},"Sales"," in ",[19,70,71],{},"A1:D5"," with an ",[19,74,75],{},"Amount"," column calculated from structured references — ",[19,78,79],{},"Sales[[#This Row],[Qty]]*Sales[[#This Row],[Price]]"," — and three summary formulas beside it that refer to the table by name: a total, a maximum and a row count. LibreOffice is used to recalculate the file and prove the conversion keeps every result.",[82,83,91,92,91,96,91,100,91,108,91,116,91,123,91,126,91,130,91,133,91,137,91,144,91,149,91,151,91,154,91,156,91,159,91,164,91,167,91,174,91,179,91,187],"svg",{"viewBox":84,"role":85,"ariaLabelledBy":86,"xmlns":89,"style":90},"133 0 493 140","img",[87,88],"tr-refs-t","tr-refs-d","http:\u002F\u002Fwww.w3.org\u002F2000\u002Fsvg","width:100%;max-width:493px;height:auto;display:block;margin:1.5rem auto;font-family:Inter,ui-sans-serif,system-ui,sans-serif","\n  ",[93,94,95],"title",{"id":87},"Structured references become cell references",[97,98,99],"desc",{"id":88},"On the left formulas written with structured references to the Sales table. On the right the same formulas with A1 references that keep working once the table is gone.",[101,102],"rect",{"x":103,"y":104,"width":105,"height":106,"fill":107},"133","0","493","140","#ffffff",[101,109],{"x":110,"y":111,"width":112,"height":113,"rx":104,"fill":107,"stroke":114,"style":115},"149.6","40.0","190.0","28.0","var(--line,#cdd5e6)","stroke-width:1px",[117,118,122],"text",{"x":119,"y":120,"style":121},"244.6","59.0","font-size:11px;font-weight:400;fill:var(--text,#172033);text-anchor:middle","=Sales[[#This Row],[Qty]]*…",[101,124],{"x":110,"y":125,"width":112,"height":113,"rx":104,"fill":107,"stroke":114,"style":115},"68.0",[117,127,129],{"x":119,"y":128,"style":121},"87.0","=SUM(Sales[Amount])",[101,131],{"x":110,"y":132,"width":112,"height":113,"rx":104,"fill":107,"stroke":114,"style":115},"96.0",[117,134,136],{"x":119,"y":135,"style":121},"115.0","=ROWS(Sales[#Data])",[101,138],{"x":139,"y":111,"width":140,"height":113,"rx":104,"fill":141,"stroke":142,"style":143},"468.2","142.1","#d9f4f1","var(--teal,#0f9488)","stroke-width:1.5px",[117,145,148],{"x":146,"y":120,"style":147},"539.3","font-size:11px;font-weight:700;fill:var(--teal-ink,#0b6157);text-anchor:middle","=B2*C2",[101,150],{"x":139,"y":125,"width":140,"height":113,"rx":104,"fill":141,"stroke":142,"style":143},[117,152,153],{"x":146,"y":128,"style":147},"=SUM($D$2:$D$5)",[101,155],{"x":139,"y":132,"width":140,"height":113,"rx":104,"fill":141,"stroke":142,"style":143},[117,157,158],{"x":146,"y":135,"style":147},"=ROWS($A$2:$D$5)",[117,160,163],{"x":119,"y":161,"style":162},"29.0","font-size:12.5px;font-weight:700;fill:var(--muted,#5b6780);text-anchor:middle","before",[117,165,166],{"x":146,"y":161,"style":162},"after",[46,168],{"x1":169,"y1":170,"x2":171,"y2":170,"stroke":172,"style":173},"349.6","82.0","454.2","var(--brand,#5b5cf0)","stroke-width:2px",[175,176],"polygon",{"points":177,"fill":178},"458.2,82.0 449.2,87.0 449.2,77.0","#5b5cf0",[101,180],{"x":181,"y":182,"width":183,"height":184,"rx":185,"fill":107,"stroke":114,"style":186},"368.5","49.0","70.9","22.0","11","stroke-width:1.2px",[117,188,192],{"x":189,"y":190,"style":191},"403.9","64.0","font-size:11.5px;font-weight:400;fill:var(--brand-strong,#4338ca);text-anchor:middle;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace","rewrite",[30,194,196],{"id":195},"step-1-see-what-breaks-if-you-only-delete-the-table","Step 1 — See what breaks if you only delete the table",[10,198,199,200,203],{},"A table lives in ",[19,201,202],{},"ws.tables",", a dictionary keyed by name. Deleting the entry removes the table object and leaves the cells:",[35,205,209],{"className":206,"code":207,"language":208,"meta":40,"style":40},"language-python shiki shiki-themes github-light github-dark-high-contrast","from openpyxl import load_workbook\n\nwb = load_workbook(\"orders_table.xlsx\")\nws = wb[\"Orders\"]\nprint(list(ws.tables.keys()), ws.tables[\"Sales\"].ref)\ndel ws.tables[\"Sales\"]\nwb.save(\"orders_naive.xlsx\")\nprint(ws[\"D2\"].value)\nprint(ws[\"G1\"].value)\n","python",[19,210,211,227,234,252,269,291,304,315,329],{"__ignoreMap":40},[44,212,213,217,221,224],{"class":46,"line":47},[44,214,216],{"class":215},"s-kum","from",[44,218,220],{"class":219},"skGVy"," openpyxl ",[44,222,223],{"class":215},"import",[44,225,226],{"class":219}," load_workbook\n",[44,228,230],{"class":46,"line":229},2,[44,231,233],{"emptyLinePlaceholder":232},true,"\n",[44,235,237,240,243,246,249],{"class":46,"line":236},3,[44,238,239],{"class":219},"wb ",[44,241,242],{"class":215},"=",[44,244,245],{"class":219}," load_workbook(",[44,247,248],{"class":54},"\"orders_table.xlsx\"",[44,250,251],{"class":219},")\n",[44,253,255,258,260,263,266],{"class":46,"line":254},4,[44,256,257],{"class":219},"ws ",[44,259,242],{"class":215},[44,261,262],{"class":219}," wb[",[44,264,265],{"class":54},"\"Orders\"",[44,267,268],{"class":219},"]\n",[44,270,272,276,279,282,285,288],{"class":46,"line":271},5,[44,273,275],{"class":274},"sP0c6","print",[44,277,278],{"class":219},"(",[44,280,281],{"class":274},"list",[44,283,284],{"class":219},"(ws.tables.keys()), ws.tables[",[44,286,287],{"class":54},"\"Sales\"",[44,289,290],{"class":219},"].ref)\n",[44,292,294,297,300,302],{"class":46,"line":293},6,[44,295,296],{"class":215},"del",[44,298,299],{"class":219}," ws.tables[",[44,301,287],{"class":54},[44,303,268],{"class":219},[44,305,307,310,313],{"class":46,"line":306},7,[44,308,309],{"class":219},"wb.save(",[44,311,312],{"class":54},"\"orders_naive.xlsx\"",[44,314,251],{"class":219},[44,316,318,320,323,326],{"class":46,"line":317},8,[44,319,275],{"class":274},[44,321,322],{"class":219},"(ws[",[44,324,325],{"class":54},"\"D2\"",[44,327,328],{"class":219},"].value)\n",[44,330,332,334,336,339],{"class":46,"line":331},9,[44,333,275],{"class":274},[44,335,322],{"class":219},[44,337,338],{"class":54},"\"G1\"",[44,340,328],{"class":219},[10,342,343,344,347,348,350],{},"The formulas still say ",[19,345,346],{},"Sales[...]",", but there is no longer anything called ",[19,349,67],{},". Recalculate both versions with LibreOffice to see the effect:",[35,352,354],{"className":37,"code":353,"language":39,"meta":40,"style":40},"soffice -env:UserInstallation=file:\u002F\u002F$PWD\u002Flo_profile --headless --convert-to xlsx --outdir calc orders_table.xlsx orders_naive.xlsx > \u002Fdev\u002Fnull 2>&1\nls calc\n",[19,355,356,400],{"__ignoreMap":40},[44,357,358,361,364,367,370,373,376,379,382,385,388,391,394,397],{"class":46,"line":47},[44,359,360],{"class":50},"soffice",[44,362,363],{"class":274}," -env:UserInstallation=file:\u002F\u002F",[44,365,366],{"class":219},"$PWD",[44,368,369],{"class":274},"\u002Flo_profile",[44,371,372],{"class":274}," --headless",[44,374,375],{"class":274}," --convert-to",[44,377,378],{"class":54}," xlsx",[44,380,381],{"class":274}," --outdir",[44,383,384],{"class":54}," calc",[44,386,387],{"class":54}," orders_table.xlsx",[44,389,390],{"class":54}," orders_naive.xlsx",[44,392,393],{"class":215}," >",[44,395,396],{"class":54}," \u002Fdev\u002Fnull",[44,398,399],{"class":215}," 2>&1\n",[44,401,402,405],{"class":46,"line":229},[44,403,404],{"class":50},"ls",[44,406,407],{"class":54}," calc\n",[35,409,411],{"className":206,"code":410,"language":208,"meta":40,"style":40},"def results(path):\n    ws = load_workbook(path, data_only=True)[\"Orders\"]\n    return [ws.cell(r, 4).value for r in range(2, 6)], [ws[f\"G{r}\"].value for r in (1, 2, 3)]\n\nprint(\"with table:   \", results(\"calc\u002Forders_table.xlsx\"))\nprint(\"table deleted:\", results(\"calc\u002Forders_naive.xlsx\"))\n",[19,412,413,425,451,537,541,559],{"__ignoreMap":40},[44,414,415,418,422],{"class":46,"line":47},[44,416,417],{"class":215},"def",[44,419,421],{"class":420},"s_Opv"," results",[44,423,424],{"class":219},"(path):\n",[44,426,427,430,432,435,439,441,444,447,449],{"class":46,"line":229},[44,428,429],{"class":219},"    ws ",[44,431,242],{"class":215},[44,433,434],{"class":219}," load_workbook(path, ",[44,436,438],{"class":437},"sa561","data_only",[44,440,242],{"class":215},[44,442,443],{"class":274},"True",[44,445,446],{"class":219},")[",[44,448,265],{"class":54},[44,450,268],{"class":219},[44,452,453,456,459,462,465,468,471,474,477,479,482,485,488,491,494,497,501,504,507,510,513,515,517,519,522,525,527,529,531,534],{"class":46,"line":236},[44,454,455],{"class":215},"    return",[44,457,458],{"class":219}," [ws.cell(r, ",[44,460,461],{"class":274},"4",[44,463,464],{"class":219},").value ",[44,466,467],{"class":215},"for",[44,469,470],{"class":219}," r ",[44,472,473],{"class":215},"in",[44,475,476],{"class":274}," range",[44,478,278],{"class":219},[44,480,481],{"class":274},"2",[44,483,484],{"class":219},", ",[44,486,487],{"class":274},"6",[44,489,490],{"class":219},")], [ws[",[44,492,493],{"class":215},"f",[44,495,496],{"class":54},"\"G",[44,498,500],{"class":499},"sSjpA","{",[44,502,503],{"class":219},"r",[44,505,506],{"class":499},"}",[44,508,509],{"class":54},"\"",[44,511,512],{"class":219},"].value ",[44,514,467],{"class":215},[44,516,470],{"class":219},[44,518,473],{"class":215},[44,520,521],{"class":219}," (",[44,523,524],{"class":274},"1",[44,526,484],{"class":219},[44,528,481],{"class":274},[44,530,484],{"class":219},[44,532,533],{"class":274},"3",[44,535,536],{"class":219},")]\n",[44,538,539],{"class":46,"line":254},[44,540,233],{"emptyLinePlaceholder":232},[44,542,543,545,547,550,553,556],{"class":46,"line":271},[44,544,275],{"class":274},[44,546,278],{"class":219},[44,548,549],{"class":54},"\"with table:   \"",[44,551,552],{"class":219},", results(",[44,554,555],{"class":54},"\"calc\u002Forders_table.xlsx\"",[44,557,558],{"class":219},"))\n",[44,560,561,563,565,568,570,573],{"class":46,"line":293},[44,562,275],{"class":274},[44,564,278],{"class":219},[44,566,567],{"class":54},"\"table deleted:\"",[44,569,552],{"class":219},[44,571,572],{"class":54},"\"calc\u002Forders_naive.xlsx\"",[44,574,558],{"class":219},[10,576,577],{},"With the table, the amounts are 12, 12.5, 8 and 35 and the total 67.5. With the table simply deleted, every formula that used it returns an error — seven broken cells from one line of code. Excel cannot resolve a reference to a table that no longer exists either, so the file is just as broken there. The table has to be converted, not just removed.",[30,579,581],{"id":580},"step-2-rewrite-structured-references-as-a1-references","Step 2 — Rewrite structured references as A1 references",[10,583,584],{},"Structured references come in a few common shapes. Translate each into the equivalent cell or range, using the table's position and column names:",[35,586,588],{"className":206,"code":587,"language":208,"meta":40,"style":40},"import re\nfrom openpyxl.utils import get_column_letter, range_boundaries\n\ndef a1_rewriter(table, ws):\n    min_col, min_row, max_col, max_row = range_boundaries(table.ref)\n    headers = [ws.cell(min_row, c).value for c in range(min_col, max_col + 1)]\n    col = {h.lower(): get_column_letter(min_col + i) for i, h in enumerate(headers)}\n    first, last = min_row + 1, max_row\n    name = re.escape(table.displayName)\n\n    def rewrite(formula, row):\n        f = re.sub(rf\"{name}\\[\\[#This Row\\],\\[([^\\]]+)\\]\\]\", lambda m: f\"{col[m.group(1).lower()]}{row}\", formula, flags=re.I)\n        f = re.sub(r\"\\[@\\[?([^\\]]+?)\\]?\\]\", lambda m: f\"{col[m.group(1).lower()]}{row}\", f)\n        f = re.sub(rf\"{name}\\[#Data\\]\", f\"${get_column_letter(min_col)}${first}:${get_column_letter(max_col)}${last}\", f, flags=re.I)\n        f = re.sub(rf\"{name}\\[#All\\]\", f\"${get_column_letter(min_col)}${min_row}:${get_column_letter(max_col)}${last}\", f, flags=re.I)\n        f = re.sub(rf\"{name}\\[([^\\[\\]#]+)\\]\", lambda m: f\"${col[m.group(1).lower()]}${first}:${col[m.group(1).lower()]}${last}\", f, flags=re.I)\n        return f\n    return rewrite\n\nwb = load_workbook(\"orders_table.xlsx\")\nws = wb[\"Orders\"]\nrewrite = a1_rewriter(ws.tables[\"Sales\"], ws)\nfor text, row in [(\"=Sales[[#This Row],[Qty]]*Sales[[#This Row],[Price]]\", 2), (\"=SUM(Sales[Amount])\", 1),\n                  (\"=ROWS(Sales[#Data])\", 3), (\"=[@Qty]*[@Price]\", 4)]:\n    print(f\"{text:55} -> {rewrite(text, row)}\")\n",[19,589,590,597,609,613,623,633,663,691,708,718,723,735,804,884,960,1029,1109,1118,1126,1131,1144,1157,1173,1206,1231],{"__ignoreMap":40},[44,591,592,594],{"class":46,"line":47},[44,593,223],{"class":215},[44,595,596],{"class":219}," re\n",[44,598,599,601,604,606],{"class":46,"line":229},[44,600,216],{"class":215},[44,602,603],{"class":219}," openpyxl.utils ",[44,605,223],{"class":215},[44,607,608],{"class":219}," get_column_letter, range_boundaries\n",[44,610,611],{"class":46,"line":236},[44,612,233],{"emptyLinePlaceholder":232},[44,614,615,617,620],{"class":46,"line":254},[44,616,417],{"class":215},[44,618,619],{"class":420}," a1_rewriter",[44,621,622],{"class":219},"(table, ws):\n",[44,624,625,628,630],{"class":46,"line":271},[44,626,627],{"class":219},"    min_col, min_row, max_col, max_row ",[44,629,242],{"class":215},[44,631,632],{"class":219}," range_boundaries(table.ref)\n",[44,634,635,638,640,643,645,648,650,652,655,658,661],{"class":46,"line":293},[44,636,637],{"class":219},"    headers ",[44,639,242],{"class":215},[44,641,642],{"class":219}," [ws.cell(min_row, c).value ",[44,644,467],{"class":215},[44,646,647],{"class":219}," c ",[44,649,473],{"class":215},[44,651,476],{"class":274},[44,653,654],{"class":219},"(min_col, max_col ",[44,656,657],{"class":215},"+",[44,659,660],{"class":274}," 1",[44,662,536],{"class":219},[44,664,665,668,670,673,675,678,680,683,685,688],{"class":46,"line":306},[44,666,667],{"class":219},"    col ",[44,669,242],{"class":215},[44,671,672],{"class":219}," {h.lower(): get_column_letter(min_col ",[44,674,657],{"class":215},[44,676,677],{"class":219}," i) ",[44,679,467],{"class":215},[44,681,682],{"class":219}," i, h ",[44,684,473],{"class":215},[44,686,687],{"class":274}," enumerate",[44,689,690],{"class":219},"(headers)}\n",[44,692,693,696,698,701,703,705],{"class":46,"line":317},[44,694,695],{"class":219},"    first, last ",[44,697,242],{"class":215},[44,699,700],{"class":219}," min_row ",[44,702,657],{"class":215},[44,704,660],{"class":274},[44,706,707],{"class":219},", max_row\n",[44,709,710,713,715],{"class":46,"line":331},[44,711,712],{"class":219},"    name ",[44,714,242],{"class":215},[44,716,717],{"class":219}," re.escape(table.displayName)\n",[44,719,721],{"class":46,"line":720},10,[44,722,233],{"emptyLinePlaceholder":232},[44,724,726,729,732],{"class":46,"line":725},11,[44,727,728],{"class":215},"    def",[44,730,731],{"class":420}," rewrite",[44,733,734],{"class":219},"(formula, row):\n",[44,736,738,741,743,746,749,751,753,756,758,761,763,766,769,771,773,775,778,780,783,786,789,791,793,796,799,801],{"class":46,"line":737},12,[44,739,740],{"class":219},"        f ",[44,742,242],{"class":215},[44,744,745],{"class":219}," re.sub(",[44,747,748],{"class":215},"rf",[44,750,509],{"class":54},[44,752,500],{"class":499},[44,754,755],{"class":219},"name",[44,757,506],{"class":499},[44,759,760],{"class":54},"\\[\\[#This Row\\],\\[([^\\]]+)\\]\\]\"",[44,762,484],{"class":219},[44,764,765],{"class":215},"lambda",[44,767,768],{"class":219}," m: ",[44,770,493],{"class":215},[44,772,509],{"class":54},[44,774,500],{"class":499},[44,776,777],{"class":219},"col[m.group(",[44,779,524],{"class":274},[44,781,782],{"class":219},").lower()]",[44,784,785],{"class":499},"}{",[44,787,788],{"class":219},"row",[44,790,506],{"class":499},[44,792,509],{"class":54},[44,794,795],{"class":219},", formula, ",[44,797,798],{"class":437},"flags",[44,800,242],{"class":215},[44,802,803],{"class":219},"re.I)\n",[44,805,807,809,811,813,815,817,821,824,826,829,832,835,838,841,844,847,849,851,853,855,857,859,861,863,865,867,869,871,873,875,877,879,881],{"class":46,"line":806},13,[44,808,740],{"class":219},[44,810,242],{"class":215},[44,812,745],{"class":219},[44,814,503],{"class":215},[44,816,509],{"class":54},[44,818,820],{"class":819},"s_b0D","\\[",[44,822,823],{"class":54},"@",[44,825,820],{"class":819},[44,827,828],{"class":215},"?",[44,830,831],{"class":274},"([",[44,833,834],{"class":215},"^",[44,836,837],{"class":819},"\\]",[44,839,840],{"class":274},"]",[44,842,843],{"class":215},"+?",[44,845,846],{"class":274},")",[44,848,837],{"class":819},[44,850,828],{"class":215},[44,852,837],{"class":819},[44,854,509],{"class":54},[44,856,484],{"class":219},[44,858,765],{"class":215},[44,860,768],{"class":219},[44,862,493],{"class":215},[44,864,509],{"class":54},[44,866,500],{"class":499},[44,868,777],{"class":219},[44,870,524],{"class":274},[44,872,782],{"class":219},[44,874,785],{"class":499},[44,876,788],{"class":219},[44,878,506],{"class":499},[44,880,509],{"class":54},[44,882,883],{"class":219},", f)\n",[44,885,887,889,891,893,895,897,899,901,903,906,908,910,913,915,918,920,923,925,928,930,933,935,938,940,942,944,947,949,951,954,956,958],{"class":46,"line":886},14,[44,888,740],{"class":219},[44,890,242],{"class":215},[44,892,745],{"class":219},[44,894,748],{"class":215},[44,896,509],{"class":54},[44,898,500],{"class":499},[44,900,755],{"class":219},[44,902,506],{"class":499},[44,904,905],{"class":54},"\\[#Data\\]\"",[44,907,484],{"class":219},[44,909,493],{"class":215},[44,911,912],{"class":54},"\"$",[44,914,500],{"class":499},[44,916,917],{"class":219},"get_column_letter(min_col)",[44,919,506],{"class":499},[44,921,922],{"class":54},"$",[44,924,500],{"class":499},[44,926,927],{"class":219},"first",[44,929,506],{"class":499},[44,931,932],{"class":54},":$",[44,934,500],{"class":499},[44,936,937],{"class":219},"get_column_letter(max_col)",[44,939,506],{"class":499},[44,941,922],{"class":54},[44,943,500],{"class":499},[44,945,946],{"class":219},"last",[44,948,506],{"class":499},[44,950,509],{"class":54},[44,952,953],{"class":219},", f, ",[44,955,798],{"class":437},[44,957,242],{"class":215},[44,959,803],{"class":219},[44,961,963,965,967,969,971,973,975,977,979,982,984,986,988,990,992,994,996,998,1001,1003,1005,1007,1009,1011,1013,1015,1017,1019,1021,1023,1025,1027],{"class":46,"line":962},15,[44,964,740],{"class":219},[44,966,242],{"class":215},[44,968,745],{"class":219},[44,970,748],{"class":215},[44,972,509],{"class":54},[44,974,500],{"class":499},[44,976,755],{"class":219},[44,978,506],{"class":499},[44,980,981],{"class":54},"\\[#All\\]\"",[44,983,484],{"class":219},[44,985,493],{"class":215},[44,987,912],{"class":54},[44,989,500],{"class":499},[44,991,917],{"class":219},[44,993,506],{"class":499},[44,995,922],{"class":54},[44,997,500],{"class":499},[44,999,1000],{"class":219},"min_row",[44,1002,506],{"class":499},[44,1004,932],{"class":54},[44,1006,500],{"class":499},[44,1008,937],{"class":219},[44,1010,506],{"class":499},[44,1012,922],{"class":54},[44,1014,500],{"class":499},[44,1016,946],{"class":219},[44,1018,506],{"class":499},[44,1020,509],{"class":54},[44,1022,953],{"class":219},[44,1024,798],{"class":437},[44,1026,242],{"class":215},[44,1028,803],{"class":219},[44,1030,1032,1034,1036,1038,1040,1042,1044,1046,1048,1051,1053,1055,1057,1059,1061,1063,1065,1067,1069,1071,1073,1075,1077,1079,1081,1083,1085,1087,1089,1091,1093,1095,1097,1099,1101,1103,1105,1107],{"class":46,"line":1031},16,[44,1033,740],{"class":219},[44,1035,242],{"class":215},[44,1037,745],{"class":219},[44,1039,748],{"class":215},[44,1041,509],{"class":54},[44,1043,500],{"class":499},[44,1045,755],{"class":219},[44,1047,506],{"class":499},[44,1049,1050],{"class":54},"\\[([^\\[\\]#]+)\\]\"",[44,1052,484],{"class":219},[44,1054,765],{"class":215},[44,1056,768],{"class":219},[44,1058,493],{"class":215},[44,1060,912],{"class":54},[44,1062,500],{"class":499},[44,1064,777],{"class":219},[44,1066,524],{"class":274},[44,1068,782],{"class":219},[44,1070,506],{"class":499},[44,1072,922],{"class":54},[44,1074,500],{"class":499},[44,1076,927],{"class":219},[44,1078,506],{"class":499},[44,1080,932],{"class":54},[44,1082,500],{"class":499},[44,1084,777],{"class":219},[44,1086,524],{"class":274},[44,1088,782],{"class":219},[44,1090,506],{"class":499},[44,1092,922],{"class":54},[44,1094,500],{"class":499},[44,1096,946],{"class":219},[44,1098,506],{"class":499},[44,1100,509],{"class":54},[44,1102,953],{"class":219},[44,1104,798],{"class":437},[44,1106,242],{"class":215},[44,1108,803],{"class":219},[44,1110,1112,1115],{"class":46,"line":1111},17,[44,1113,1114],{"class":215},"        return",[44,1116,1117],{"class":219}," f\n",[44,1119,1121,1123],{"class":46,"line":1120},18,[44,1122,455],{"class":215},[44,1124,1125],{"class":219}," rewrite\n",[44,1127,1129],{"class":46,"line":1128},19,[44,1130,233],{"emptyLinePlaceholder":232},[44,1132,1134,1136,1138,1140,1142],{"class":46,"line":1133},20,[44,1135,239],{"class":219},[44,1137,242],{"class":215},[44,1139,245],{"class":219},[44,1141,248],{"class":54},[44,1143,251],{"class":219},[44,1145,1147,1149,1151,1153,1155],{"class":46,"line":1146},21,[44,1148,257],{"class":219},[44,1150,242],{"class":215},[44,1152,262],{"class":219},[44,1154,265],{"class":54},[44,1156,268],{"class":219},[44,1158,1160,1163,1165,1168,1170],{"class":46,"line":1159},22,[44,1161,1162],{"class":219},"rewrite ",[44,1164,242],{"class":215},[44,1166,1167],{"class":219}," a1_rewriter(ws.tables[",[44,1169,287],{"class":54},[44,1171,1172],{"class":219},"], ws)\n",[44,1174,1176,1178,1181,1183,1186,1189,1191,1193,1196,1199,1201,1203],{"class":46,"line":1175},23,[44,1177,467],{"class":215},[44,1179,1180],{"class":219}," text, row ",[44,1182,473],{"class":215},[44,1184,1185],{"class":219}," [(",[44,1187,1188],{"class":54},"\"=Sales[[#This Row],[Qty]]*Sales[[#This Row],[Price]]\"",[44,1190,484],{"class":219},[44,1192,481],{"class":274},[44,1194,1195],{"class":219},"), (",[44,1197,1198],{"class":54},"\"=SUM(Sales[Amount])\"",[44,1200,484],{"class":219},[44,1202,524],{"class":274},[44,1204,1205],{"class":219},"),\n",[44,1207,1209,1212,1215,1217,1219,1221,1224,1226,1228],{"class":46,"line":1208},24,[44,1210,1211],{"class":219},"                  (",[44,1213,1214],{"class":54},"\"=ROWS(Sales[#Data])\"",[44,1216,484],{"class":219},[44,1218,533],{"class":274},[44,1220,1195],{"class":219},[44,1222,1223],{"class":54},"\"=[@Qty]*[@Price]\"",[44,1225,484],{"class":219},[44,1227,461],{"class":274},[44,1229,1230],{"class":219},")]:\n",[44,1232,1234,1237,1239,1241,1243,1245,1247,1250,1252,1255,1257,1260,1262,1264],{"class":46,"line":1233},25,[44,1235,1236],{"class":274},"    print",[44,1238,278],{"class":219},[44,1240,493],{"class":215},[44,1242,509],{"class":54},[44,1244,500],{"class":499},[44,1246,117],{"class":219},[44,1248,1249],{"class":215},":55",[44,1251,506],{"class":499},[44,1253,1254],{"class":54}," -> ",[44,1256,500],{"class":499},[44,1258,1259],{"class":219},"rewrite(text, row)",[44,1261,506],{"class":499},[44,1263,509],{"class":54},[44,1265,251],{"class":219},[10,1267,1268,1269,1272,1273,1276,1277,1280,1281,1284,1285,1288,1289,1292,1293,1296,1297,1300],{},"Row-relative references — ",[19,1270,1271],{},"[#This Row]"," and the ",[19,1274,1275],{},"[@Col]"," shorthand — become a relative cell in the same row, such as ",[19,1278,1279],{},"B2","; whole-column references become absolute ranges, ",[19,1282,1283],{},"$D$2:$D$5",", because a column of a table is a fixed block once the table is gone. ",[19,1286,1287],{},"#Data"," means the data rows without the header, ",[19,1290,1291],{},"#All"," includes the header. The patterns cover the forms Excel and Python scripts commonly write; references to the totals row (",[19,1294,1295],{},"#Totals",") or to other tables need their own rule — add it the same way, and fail loudly when a formula still contains a ",[19,1298,1299],{},"["," after rewriting.",[30,1302,1304],{"id":1303},"step-3-convert-rewrite-every-formula-then-remove-the-table","Step 3 — Convert: rewrite every formula, then remove the table",[82,1306,91,1312,91,1315,91,1318,91,1322,91,1330,91,1341,91,1347,91,1352,91,1356,91,1361,91,1364,91,1368,91,1375,91,1380,91,1384,91,1387,91,1391,91,1394,91,1399,91,1406,91,1411,91,1414,91,1417,91,1421,91,1424,91,1427,91,1433,91,1437,91,1439,91,1442,91,1446,91,1449,91,1452,91,1459,91,1465],{"viewBox":1307,"role":85,"ariaLabelledBy":1308,"xmlns":89,"style":1311},"4 0 752 142",[1309,1310],"tr-steps-t","tr-steps-d","width:100%;max-width:752px;height:auto;display:block;margin:1.5rem auto;font-family:Inter,ui-sans-serif,system-ui,sans-serif",[93,1313,1314],{"id":1309},"The order of operations",[97,1316,1317],{"id":1310},"Read the table's position and headers, rewrite every formula in the workbook that refers to it, stop if any reference could not be translated, and only then delete the table object and restore the look.",[101,1319],{"x":461,"y":104,"width":1320,"height":1321,"fill":107},"752","142",[101,1323],{"x":1324,"y":1325,"width":1326,"height":1327,"rx":1328,"fill":1329,"stroke":114,"style":173},"20.0","16.0","115.2","110.5","12","#e7ebef",[1331,1332,1334],"g",{"transform":1333},"translate(65.6,29.0) scale(1.000)",[1335,1336],"path",{"d":1337,"fill":1338,"stroke":1339,"style":1340},"M3 5h18v14H3z M3 10h18 M3 15h18 M9 5v14","none","var(--text,#172033)","stroke-width:1.80px;stroke-linecap:round;stroke-linejoin:round",[117,1342,1346],{"x":1343,"y":1344,"style":1345},"77.6","75.5","font-size:13.5px;font-weight:700;fill:var(--text,#172033);text-anchor:middle","Read table",[117,1348,1351],{"x":1343,"y":1349,"style":1350},"95.0","font-size:11.5px;font-weight:400;fill:var(--text,#172033);text-anchor:middle","ref and header",[117,1353,1355],{"x":1343,"y":1354,"style":1350},"112.5","names",[46,1357],{"x1":1358,"y1":1359,"x2":1360,"y2":1359,"stroke":172,"style":173},"140.2","71.2","162.2",[175,1362],{"points":1363,"fill":178},"166.2,71.2 157.2,76.2 157.2,66.2",[101,1365],{"x":1366,"y":1325,"width":1326,"height":1327,"rx":1328,"fill":1367,"stroke":172,"style":173},"171.2","#f0f4ff",[1331,1369,1371],{"transform":1370},"translate(216.8,29.0) scale(1.000)",[1335,1372],{"d":1373,"fill":1338,"stroke":1374,"style":1340},"M9 8l-4 4 4 4 M15 8l4 4-4 4","var(--brand-strong,#4338ca)",[117,1376,1379],{"x":1377,"y":1344,"style":1378},"228.8","font-size:13.5px;font-weight:700;fill:var(--brand-strong,#4338ca);text-anchor:middle","Rewrite",[117,1381,1383],{"x":1377,"y":1382,"style":1378},"93.0","formulas",[117,1385,1386],{"x":1377,"y":1354,"style":1350},"every sheet",[46,1388],{"x1":1389,"y1":1359,"x2":1390,"y2":1359,"stroke":172,"style":173},"291.4","313.4",[175,1392],{"points":1393,"fill":178},"317.4,71.2 308.4,76.2 308.4,66.2",[101,1395],{"x":1396,"y":1325,"width":1326,"height":1327,"rx":1328,"fill":1397,"stroke":1398,"style":173},"322.4","#fdefd8","var(--gold,#b4740a)",[1331,1400,1402],{"transform":1401},"translate(368.0,29.0) scale(1.000)",[1335,1403],{"d":1404,"fill":1338,"stroke":1405,"style":1340},"M12 3.5l9.5 17h-19z M12 10v5 M12 17.8v.4","var(--gold-ink,#7a4e06)",[117,1407,1410],{"x":1408,"y":1344,"style":1409},"380.0","font-size:13.5px;font-weight:700;fill:var(--gold-ink,#7a4e06);text-anchor:middle","Anything",[117,1412,1413],{"x":1408,"y":1382,"style":1409},"left?",[117,1415,1416],{"x":1408,"y":1354,"style":1350},"a '[' means stop",[46,1418],{"x1":1419,"y1":1359,"x2":1420,"y2":1359,"stroke":172,"style":173},"442.6","464.6",[175,1422],{"points":1423,"fill":178},"468.6,71.2 459.6,76.2 459.6,66.2",[101,1425],{"x":1426,"y":1325,"width":1326,"height":1327,"rx":1328,"fill":1367,"stroke":172,"style":173},"473.6",[1331,1428,1430],{"transform":1429},"translate(519.2,29.0) scale(1.000)",[1335,1431],{"d":1432,"fill":1338,"stroke":1374,"style":1340},"M4 7h16 M10 11v6 M14 11v6 M6 7l1 13h10l1-13 M9 7V4h6v3",[117,1434,1436],{"x":1435,"y":1344,"style":1378},"531.2","Delete table",[117,1438,296],{"x":1435,"y":1349,"style":1350},[117,1440,1441],{"x":1435,"y":1354,"style":1350},"ws.tables[name]",[46,1443],{"x1":1444,"y1":1359,"x2":1445,"y2":1359,"stroke":172,"style":173},"593.8","615.8",[175,1447],{"points":1448,"fill":178},"619.8,71.2 610.8,76.2 610.8,66.2",[101,1450],{"x":1451,"y":1325,"width":1326,"height":1327,"rx":1328,"fill":141,"stroke":142,"style":173},"624.8",[1331,1453,1455],{"transform":1454},"translate(670.4,37.8) scale(1.000)",[1335,1456],{"d":1457,"fill":1338,"stroke":1458,"style":1340},"M5 12.5l4.5 4.5L19 7","var(--teal-ink,#0b6157)",[117,1460,1464],{"x":1461,"y":1462,"style":1463},"682.4","84.2","font-size:13.5px;font-weight:700;fill:var(--teal-ink,#0b6157);text-anchor:middle","Restore look",[117,1466,1468],{"x":1461,"y":1467,"style":1350},"103.8","fills, AutoFilter",[10,1470,1471],{},"Apply the rewriter to every formula on every sheet — references to a table can live anywhere in the workbook — then delete the table:",[35,1473,1475],{"className":206,"code":1474,"language":208,"meta":40,"style":40},"def convert_table_to_range(wb, sheet, table_name):\n    ws = wb[sheet]\n    table = ws.tables[table_name]\n    rewrite = a1_rewriter(table, ws)\n    changed = 0\n    for other in wb.worksheets:\n        for row in other.iter_rows():\n            for cell in row:\n                if cell.data_type != \"f\":\n                    continue\n                uses_table = table_name.lower() in cell.value.lower()\n                uses_shorthand = other is ws and \"[@\" in cell.value\n                if uses_table or uses_shorthand:\n                    new = rewrite(cell.value, cell.row)\n                    if \"[\" in new:\n                        raise ValueError(f\"{other.title}!{cell.coordinate}: could not rewrite {cell.value}\")\n                    cell.value = new\n                    changed += 1\n    del ws.tables[table_name]\n    return changed\n\nwb = load_workbook(\"orders_table.xlsx\")\nprint(convert_table_to_range(wb, \"Orders\", \"Sales\"), \"formulas rewritten\")\nws = wb[\"Orders\"]\nprint(ws[\"D2\"].value, ws[\"G1\"].value, ws[\"G3\"].value, \"| tables left:\", list(ws.tables))\n",[19,1476,1477,1487,1496,1506,1516,1526,1539,1552,1565,1582,1587,1602,1629,1642,1652,1665,1710,1720,1731,1738,1745,1749,1761,1782,1794],{"__ignoreMap":40},[44,1478,1479,1481,1484],{"class":46,"line":47},[44,1480,417],{"class":215},[44,1482,1483],{"class":420}," convert_table_to_range",[44,1485,1486],{"class":219},"(wb, sheet, table_name):\n",[44,1488,1489,1491,1493],{"class":46,"line":229},[44,1490,429],{"class":219},[44,1492,242],{"class":215},[44,1494,1495],{"class":219}," wb[sheet]\n",[44,1497,1498,1501,1503],{"class":46,"line":236},[44,1499,1500],{"class":219},"    table ",[44,1502,242],{"class":215},[44,1504,1505],{"class":219}," ws.tables[table_name]\n",[44,1507,1508,1511,1513],{"class":46,"line":254},[44,1509,1510],{"class":219},"    rewrite ",[44,1512,242],{"class":215},[44,1514,1515],{"class":219}," a1_rewriter(table, ws)\n",[44,1517,1518,1521,1523],{"class":46,"line":271},[44,1519,1520],{"class":219},"    changed ",[44,1522,242],{"class":215},[44,1524,1525],{"class":274}," 0\n",[44,1527,1528,1531,1534,1536],{"class":46,"line":293},[44,1529,1530],{"class":215},"    for",[44,1532,1533],{"class":219}," other ",[44,1535,473],{"class":215},[44,1537,1538],{"class":219}," wb.worksheets:\n",[44,1540,1541,1544,1547,1549],{"class":46,"line":306},[44,1542,1543],{"class":215},"        for",[44,1545,1546],{"class":219}," row ",[44,1548,473],{"class":215},[44,1550,1551],{"class":219}," other.iter_rows():\n",[44,1553,1554,1557,1560,1562],{"class":46,"line":317},[44,1555,1556],{"class":215},"            for",[44,1558,1559],{"class":219}," cell ",[44,1561,473],{"class":215},[44,1563,1564],{"class":219}," row:\n",[44,1566,1567,1570,1573,1576,1579],{"class":46,"line":331},[44,1568,1569],{"class":215},"                if",[44,1571,1572],{"class":219}," cell.data_type ",[44,1574,1575],{"class":215},"!=",[44,1577,1578],{"class":54}," \"f\"",[44,1580,1581],{"class":219},":\n",[44,1583,1584],{"class":46,"line":720},[44,1585,1586],{"class":215},"                    continue\n",[44,1588,1589,1592,1594,1597,1599],{"class":46,"line":725},[44,1590,1591],{"class":219},"                uses_table ",[44,1593,242],{"class":215},[44,1595,1596],{"class":219}," table_name.lower() ",[44,1598,473],{"class":215},[44,1600,1601],{"class":219}," cell.value.lower()\n",[44,1603,1604,1607,1609,1611,1614,1617,1620,1623,1626],{"class":46,"line":737},[44,1605,1606],{"class":219},"                uses_shorthand ",[44,1608,242],{"class":215},[44,1610,1533],{"class":219},[44,1612,1613],{"class":215},"is",[44,1615,1616],{"class":219}," ws ",[44,1618,1619],{"class":215},"and",[44,1621,1622],{"class":54}," \"[@\"",[44,1624,1625],{"class":215}," in",[44,1627,1628],{"class":219}," cell.value\n",[44,1630,1631,1633,1636,1639],{"class":46,"line":806},[44,1632,1569],{"class":215},[44,1634,1635],{"class":219}," uses_table ",[44,1637,1638],{"class":215},"or",[44,1640,1641],{"class":219}," uses_shorthand:\n",[44,1643,1644,1647,1649],{"class":46,"line":886},[44,1645,1646],{"class":219},"                    new ",[44,1648,242],{"class":215},[44,1650,1651],{"class":219}," rewrite(cell.value, cell.row)\n",[44,1653,1654,1657,1660,1662],{"class":46,"line":962},[44,1655,1656],{"class":215},"                    if",[44,1658,1659],{"class":54}," \"[\"",[44,1661,1625],{"class":215},[44,1663,1664],{"class":219}," new:\n",[44,1666,1667,1670,1673,1675,1677,1679,1681,1684,1686,1689,1691,1694,1696,1699,1701,1704,1706,1708],{"class":46,"line":1031},[44,1668,1669],{"class":215},"                        raise",[44,1671,1672],{"class":274}," ValueError",[44,1674,278],{"class":219},[44,1676,493],{"class":215},[44,1678,509],{"class":54},[44,1680,500],{"class":499},[44,1682,1683],{"class":219},"other.title",[44,1685,506],{"class":499},[44,1687,1688],{"class":54},"!",[44,1690,500],{"class":499},[44,1692,1693],{"class":219},"cell.coordinate",[44,1695,506],{"class":499},[44,1697,1698],{"class":54},": could not rewrite ",[44,1700,500],{"class":499},[44,1702,1703],{"class":219},"cell.value",[44,1705,506],{"class":499},[44,1707,509],{"class":54},[44,1709,251],{"class":219},[44,1711,1712,1715,1717],{"class":46,"line":1111},[44,1713,1714],{"class":219},"                    cell.value ",[44,1716,242],{"class":215},[44,1718,1719],{"class":219}," new\n",[44,1721,1722,1725,1728],{"class":46,"line":1120},[44,1723,1724],{"class":219},"                    changed ",[44,1726,1727],{"class":215},"+=",[44,1729,1730],{"class":274}," 1\n",[44,1732,1733,1736],{"class":46,"line":1128},[44,1734,1735],{"class":215},"    del",[44,1737,1505],{"class":219},[44,1739,1740,1742],{"class":46,"line":1133},[44,1741,455],{"class":215},[44,1743,1744],{"class":219}," changed\n",[44,1746,1747],{"class":46,"line":1146},[44,1748,233],{"emptyLinePlaceholder":232},[44,1750,1751,1753,1755,1757,1759],{"class":46,"line":1159},[44,1752,239],{"class":219},[44,1754,242],{"class":215},[44,1756,245],{"class":219},[44,1758,248],{"class":54},[44,1760,251],{"class":219},[44,1762,1763,1765,1768,1770,1772,1774,1777,1780],{"class":46,"line":1175},[44,1764,275],{"class":274},[44,1766,1767],{"class":219},"(convert_table_to_range(wb, ",[44,1769,265],{"class":54},[44,1771,484],{"class":219},[44,1773,287],{"class":54},[44,1775,1776],{"class":219},"), ",[44,1778,1779],{"class":54},"\"formulas rewritten\"",[44,1781,251],{"class":219},[44,1783,1784,1786,1788,1790,1792],{"class":46,"line":1208},[44,1785,257],{"class":219},[44,1787,242],{"class":215},[44,1789,262],{"class":219},[44,1791,265],{"class":54},[44,1793,268],{"class":219},[44,1795,1796,1798,1800,1802,1805,1807,1809,1812,1815,1818,1820,1822],{"class":46,"line":1233},[44,1797,275],{"class":274},[44,1799,322],{"class":219},[44,1801,325],{"class":54},[44,1803,1804],{"class":219},"].value, ws[",[44,1806,338],{"class":54},[44,1808,1804],{"class":219},[44,1810,1811],{"class":54},"\"G3\"",[44,1813,1814],{"class":219},"].value, ",[44,1816,1817],{"class":54},"\"| tables left:\"",[44,1819,484],{"class":219},[44,1821,281],{"class":274},[44,1823,1824],{"class":219},"(ws.tables))\n",[10,1826,1827,1828,1830],{},"The check for a remaining ",[19,1829,1299],{}," means a formula the rewriter did not understand stops the conversion with its address, instead of being left half-translated. Nothing has been saved or deleted at that point — the earlier rewrites exist only in memory — so the workbook can be inspected, the rule added, and the conversion run again from the same file.",[30,1832,1834],{"id":1833},"step-4-keep-the-look-and-the-filter-buttons","Step 4 — Keep the look and the filter buttons",[10,1836,1837,1838,1841],{},"The banded rows and coloured header came from the ",[14,1839,1840],{},"table style",", not from the cells, so they vanish with the table. If the range should still look the same, write the styling into the cells; if the filter buttons are wanted, add a plain AutoFilter:",[35,1843,1845],{"className":206,"code":1844,"language":208,"meta":40,"style":40},"from openpyxl.styles import Font, PatternFill\n\nheader_fill = PatternFill(\"solid\", fgColor=\"4F81BD\")\nband_fill = PatternFill(\"solid\", fgColor=\"DCE6F1\")\nfor c in ws[1][:4]:\n    c.font, c.fill = Font(bold=True, color=\"FFFFFF\"), header_fill\nfor r in range(2, 6):\n    if r % 2 == 0:\n        for c in ws[r][:4]:\n            c.fill = band_fill\nws.auto_filter.ref = \"A1:D5\"\nwb.save(\"orders_range.xlsx\")\nprint(\"filter:\", ws.auto_filter.ref)\n",[19,1846,1847,1859,1863,1888,1910,1931,1961,1982,2003,2018,2028,2038,2047],{"__ignoreMap":40},[44,1848,1849,1851,1854,1856],{"class":46,"line":47},[44,1850,216],{"class":215},[44,1852,1853],{"class":219}," openpyxl.styles ",[44,1855,223],{"class":215},[44,1857,1858],{"class":219}," Font, PatternFill\n",[44,1860,1861],{"class":46,"line":229},[44,1862,233],{"emptyLinePlaceholder":232},[44,1864,1865,1868,1870,1873,1876,1878,1881,1883,1886],{"class":46,"line":236},[44,1866,1867],{"class":219},"header_fill ",[44,1869,242],{"class":215},[44,1871,1872],{"class":219}," PatternFill(",[44,1874,1875],{"class":54},"\"solid\"",[44,1877,484],{"class":219},[44,1879,1880],{"class":437},"fgColor",[44,1882,242],{"class":215},[44,1884,1885],{"class":54},"\"4F81BD\"",[44,1887,251],{"class":219},[44,1889,1890,1893,1895,1897,1899,1901,1903,1905,1908],{"class":46,"line":254},[44,1891,1892],{"class":219},"band_fill ",[44,1894,242],{"class":215},[44,1896,1872],{"class":219},[44,1898,1875],{"class":54},[44,1900,484],{"class":219},[44,1902,1880],{"class":437},[44,1904,242],{"class":215},[44,1906,1907],{"class":54},"\"DCE6F1\"",[44,1909,251],{"class":219},[44,1911,1912,1914,1916,1918,1921,1923,1926,1928],{"class":46,"line":271},[44,1913,467],{"class":215},[44,1915,647],{"class":219},[44,1917,473],{"class":215},[44,1919,1920],{"class":219}," ws[",[44,1922,524],{"class":274},[44,1924,1925],{"class":219},"][:",[44,1927,461],{"class":274},[44,1929,1930],{"class":219},"]:\n",[44,1932,1933,1936,1938,1941,1944,1946,1948,1950,1953,1955,1958],{"class":46,"line":293},[44,1934,1935],{"class":219},"    c.font, c.fill ",[44,1937,242],{"class":215},[44,1939,1940],{"class":219}," Font(",[44,1942,1943],{"class":437},"bold",[44,1945,242],{"class":215},[44,1947,443],{"class":274},[44,1949,484],{"class":219},[44,1951,1952],{"class":437},"color",[44,1954,242],{"class":215},[44,1956,1957],{"class":54},"\"FFFFFF\"",[44,1959,1960],{"class":219},"), header_fill\n",[44,1962,1963,1965,1967,1969,1971,1973,1975,1977,1979],{"class":46,"line":306},[44,1964,467],{"class":215},[44,1966,470],{"class":219},[44,1968,473],{"class":215},[44,1970,476],{"class":274},[44,1972,278],{"class":219},[44,1974,481],{"class":274},[44,1976,484],{"class":219},[44,1978,487],{"class":274},[44,1980,1981],{"class":219},"):\n",[44,1983,1984,1987,1989,1992,1995,1998,2001],{"class":46,"line":317},[44,1985,1986],{"class":215},"    if",[44,1988,470],{"class":219},[44,1990,1991],{"class":215},"%",[44,1993,1994],{"class":274}," 2",[44,1996,1997],{"class":215}," ==",[44,1999,2000],{"class":274}," 0",[44,2002,1581],{"class":219},[44,2004,2005,2007,2009,2011,2014,2016],{"class":46,"line":331},[44,2006,1543],{"class":215},[44,2008,647],{"class":219},[44,2010,473],{"class":215},[44,2012,2013],{"class":219}," ws[r][:",[44,2015,461],{"class":274},[44,2017,1930],{"class":219},[44,2019,2020,2023,2025],{"class":46,"line":720},[44,2021,2022],{"class":219},"            c.fill ",[44,2024,242],{"class":215},[44,2026,2027],{"class":219}," band_fill\n",[44,2029,2030,2033,2035],{"class":46,"line":725},[44,2031,2032],{"class":219},"ws.auto_filter.ref ",[44,2034,242],{"class":215},[44,2036,2037],{"class":54}," \"A1:D5\"\n",[44,2039,2040,2042,2045],{"class":46,"line":737},[44,2041,309],{"class":219},[44,2043,2044],{"class":54},"\"orders_range.xlsx\"",[44,2046,251],{"class":219},[44,2048,2049,2051,2053,2056],{"class":46,"line":806},[44,2050,275],{"class":274},[44,2052,278],{"class":219},[44,2054,2055],{"class":54},"\"filter:\"",[44,2057,2058],{"class":219},", ws.auto_filter.ref)\n",[10,2060,2061,2062,2066],{},"Baked-in fills do not re-band when rows are sorted or inserted, which is one of the reasons tables exist; decide whether the plain range really needs to look banded. ",[24,2063,2065],{"href":2064},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fstyling-excel-cells-with-openpyxl\u002Fadd-alternating-row-colors-with-openpyxl\u002F","Add Alternating Row Colors with openpyxl"," shows a conditional-formatting alternative that does re-band.",[82,2068,91,2073,91,2076,91,2079,91,2082,91,2087,91,2093,91,2099,91,2104,91,2110,91,2118,91,2122,91,2127,91,2131,91,2136,91,2140,91,2145,91,2148,91,2153,91,2158,91,2162,91,2166,91,2171,91,2174,91,2179,91,2182,91,2187,91,2190],{"viewBox":2069,"role":85,"ariaLabelledBy":2070,"xmlns":89,"style":1311},"4 0 752 233",[2071,2072],"tr-lost-t","tr-lost-d",[93,2074,2075],{"id":2071},"What goes with the table and how to keep it",[97,2077,2078],{"id":2072},"Two panels. Removing the table object takes its style, banding, structured references, filter buttons and automatic expansion with it. The conversion rewrites the references, writes fills into cells and adds a plain AutoFilter; automatic expansion is gone for good.",[101,2080],{"x":461,"y":104,"width":1320,"height":2081,"fill":107},"233",[101,2083],{"x":1324,"y":1325,"width":2084,"height":2085,"rx":2086,"fill":1397,"stroke":1398,"style":173},"351.0","201.0","14",[1331,2088,2090],{"transform":2089},"translate(182.5,29.0) scale(1.083)",[1335,2091],{"d":1404,"fill":1338,"stroke":1405,"style":2092},"stroke-width:1.66px;stroke-linecap:round;stroke-linejoin:round",[117,2094,2098],{"x":2095,"y":2096,"style":2097},"195.5","78.0","font-size:14px;font-weight:700;fill:var(--gold-ink,#7a4e06);text-anchor:middle","Lost with the table",[46,2100],{"x1":2101,"y1":2102,"x2":2103,"y2":2102,"stroke":1398,"style":115},"36.0","91.0","355.0",[117,2105,2109],{"x":2106,"y":2107,"style":2108},"60.0","111.0","font-size:12px;font-weight:400;fill:var(--text,#172033);text-anchor:start","table style and banding",[1331,2111,2113],{"transform":2112},"translate(38.5,99.5) scale(0.625)",[1335,2114],{"d":2115,"fill":1338,"stroke":2116,"style":2117},"M6 6l12 12 M18 6L6 18","var(--accent,#f43f8f)","stroke-width:2.88px;stroke-linecap:round;stroke-linejoin:round",[117,2119,2121],{"x":2106,"y":2120,"style":2108},"137.0","structured references",[1331,2123,2125],{"transform":2124},"translate(38.5,125.5) scale(0.625)",[1335,2126],{"d":2115,"fill":1338,"stroke":2116,"style":2117},[117,2128,2130],{"x":2106,"y":2129,"style":2108},"163.0","filter buttons",[1331,2132,2134],{"transform":2133},"translate(38.5,151.5) scale(0.625)",[1335,2135],{"d":2115,"fill":1338,"stroke":2116,"style":2117},[117,2137,2139],{"x":2106,"y":2138,"style":2108},"189.0","auto-expanding range",[1331,2141,2143],{"transform":2142},"translate(38.5,177.5) scale(0.625)",[1335,2144],{"d":2115,"fill":1338,"stroke":2116,"style":2117},[101,2146],{"x":2147,"y":1325,"width":2084,"height":2085,"rx":2086,"fill":141,"stroke":142,"style":173},"389.0",[1331,2149,2151],{"transform":2150},"translate(551.5,29.0) scale(1.083)",[1335,2152],{"d":1457,"fill":1338,"stroke":1458,"style":2092},[117,2154,2157],{"x":2155,"y":2096,"style":2156},"564.5","font-size:14px;font-weight:700;fill:var(--teal-ink,#0b6157);text-anchor:middle","Kept by the conversion",[46,2159],{"x1":2160,"y1":2102,"x2":2161,"y2":2102,"stroke":142,"style":115},"405.0","724.0",[117,2163,2165],{"x":2164,"y":2107,"style":2108},"429.0","formulas as A1 references",[1331,2167,2169],{"transform":2168},"translate(407.5,99.5) scale(0.625)",[1335,2170],{"d":1457,"fill":1338,"stroke":142,"style":2117},[117,2172,2173],{"x":2164,"y":2120,"style":2108},"fills written into cells",[1331,2175,2177],{"transform":2176},"translate(407.5,125.5) scale(0.625)",[1335,2178],{"d":1457,"fill":1338,"stroke":142,"style":2117},[117,2180,2181],{"x":2164,"y":2129,"style":2108},"a plain AutoFilter",[1331,2183,2185],{"transform":2184},"translate(407.5,151.5) scale(0.625)",[1335,2186],{"d":1457,"fill":1338,"stroke":142,"style":2117},[117,2188,2189],{"x":2164,"y":2138,"style":2108},"no automatic expansion",[1331,2191,2193],{"transform":2192},"translate(407.5,177.5) scale(0.625)",[1335,2194],{"d":1404,"fill":1338,"stroke":1398,"style":2117},[30,2196,2198],{"id":2197},"step-5-prove-nothing-changed","Step 5 — Prove nothing changed",[10,2200,2201],{},"Recalculate the converted file and compare every result with the original:",[35,2203,2205],{"className":37,"code":2204,"language":39,"meta":40,"style":40},"soffice -env:UserInstallation=file:\u002F\u002F$PWD\u002Flo_profile --headless --convert-to xlsx --outdir calc orders_range.xlsx > \u002Fdev\u002Fnull 2>&1\nls calc\n",[19,2206,2207,2236],{"__ignoreMap":40},[44,2208,2209,2211,2213,2215,2217,2219,2221,2223,2225,2227,2230,2232,2234],{"class":46,"line":47},[44,2210,360],{"class":50},[44,2212,363],{"class":274},[44,2214,366],{"class":219},[44,2216,369],{"class":274},[44,2218,372],{"class":274},[44,2220,375],{"class":274},[44,2222,378],{"class":54},[44,2224,381],{"class":274},[44,2226,384],{"class":54},[44,2228,2229],{"class":54}," orders_range.xlsx",[44,2231,393],{"class":215},[44,2233,396],{"class":54},[44,2235,399],{"class":215},[44,2237,2238,2240],{"class":46,"line":229},[44,2239,404],{"class":50},[44,2241,407],{"class":54},[35,2243,2245],{"className":206,"code":2244,"language":208,"meta":40,"style":40},"before, after = results(\"calc\u002Forders_table.xlsx\"), results(\"calc\u002Forders_range.xlsx\")\nprint(\"before:\", before)\nprint(\"after: \", after)\nprint(\"identical:\", before == after)\n",[19,2246,2247,2267,2279,2291],{"__ignoreMap":40},[44,2248,2249,2252,2254,2257,2259,2262,2265],{"class":46,"line":47},[44,2250,2251],{"class":219},"before, after ",[44,2253,242],{"class":215},[44,2255,2256],{"class":219}," results(",[44,2258,555],{"class":54},[44,2260,2261],{"class":219},"), results(",[44,2263,2264],{"class":54},"\"calc\u002Forders_range.xlsx\"",[44,2266,251],{"class":219},[44,2268,2269,2271,2273,2276],{"class":46,"line":229},[44,2270,275],{"class":274},[44,2272,278],{"class":219},[44,2274,2275],{"class":54},"\"before:\"",[44,2277,2278],{"class":219},", before)\n",[44,2280,2281,2283,2285,2288],{"class":46,"line":236},[44,2282,275],{"class":274},[44,2284,278],{"class":219},[44,2286,2287],{"class":54},"\"after: \"",[44,2289,2290],{"class":219},", after)\n",[44,2292,2293,2295,2297,2300,2303,2306],{"class":46,"line":254},[44,2294,275],{"class":274},[44,2296,278],{"class":219},[44,2298,2299],{"class":54},"\"identical:\"",[44,2301,2302],{"class":219},", before ",[44,2304,2305],{"class":215},"==",[44,2307,2308],{"class":219}," after)\n",[10,2310,2311,2312,2316],{},"Amounts 12, 12.5, 8 and 35, a total of 67.5, a maximum of 35 and four lines — the same as with the table. A check like this is cheap and should be part of any script that rewrites formulas; ",[24,2313,2315],{"href":2314},"\u002Fgetting-started-with-python-excel-automation\u002Fworking-with-excel-formulas-in-python\u002Frecalculate-excel-formulas-without-excel-in-python\u002F","Recalculate Excel Formulas Without Excel"," explains the LibreOffice step.",[30,2318,2320],{"id":2319},"performance-notes","Performance notes",[10,2322,2323,2324,2328],{},"The conversion touches every formula cell in the workbook once, and each rewrite is a handful of regular-expression substitutions, so even workbooks with tens of thousands of formulas convert in a second or two. Loading and saving the workbook with openpyxl costs more than the rewriting. The one thing to avoid is running the conversion table by table with a save in between: load once, convert every table that needs it, and save once. Remember too that openpyxl drops charts and some other objects when it saves an existing workbook, so check ",[24,2325,2327],{"href":2326},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-openpyxl-for-excel-file-manipulation\u002Fwhat-openpyxl-loses-when-saving-an-existing-workbook\u002F","What openpyxl Loses When Saving an Existing Workbook"," before converting a file that contains them.",[30,2330,2332],{"id":2331},"common-pitfalls","Common pitfalls",[2334,2335,2336,2344,2350,2358,2370],"ul",{},[2337,2338,2339,2343],"li",{},[2340,2341,2342],"strong",{},"Deleting the table without rewriting formulas."," Every structured reference breaks.",[2337,2345,2346,2349],{},[2340,2347,2348],{},"Formulas on other sheets."," Summary sheets refer to tables by name; scan the whole workbook.",[2337,2351,2352,2357],{},[2340,2353,2354,2356],{},[19,2355,1275],{}," shorthand."," It appears in formulas inside the table; translate it to the same-row cell.",[2337,2359,2360,2363,2364,484,2366,2369],{},[2340,2361,2362],{},"Totals rows and special items."," ",[19,2365,1295],{},[19,2367,2368],{},"#Headers"," and references to other tables need their own rules; stop on anything unrecognised.",[2337,2371,2372,2375],{},[2340,2373,2374],{},"Expecting the banding to survive."," It belongs to the table style; write fills or conditional formats if needed.",[30,2377,2379],{"id":2378},"conclusion","Conclusion",[10,2381,2382,2383,2386,2387,2389,2390,2392],{},"Converting a table to a range is two jobs: rewriting structured references into A1 references everywhere in the workbook, and removing the table object with ",[19,2384,2385],{},"del ws.tables[name]",". Translate ",[19,2388,1271],{}," and ",[19,2391,1275],{}," to same-row cells and whole columns to absolute ranges, stop on anything unrecognised, write the header and band fills into the cells if the look matters, add a plain AutoFilter if the buttons are wanted, and recalculate before and after to prove every result is unchanged.",[30,2394,2396],{"id":2395},"frequently-asked-questions","Frequently asked questions",[10,2398,2399,2402,2403,2406],{},[2340,2400,2401],{},"How do I remove an Excel table with openpyxl?","\nDelete it from the worksheet's tables dictionary: del ws.tables",[44,2404,2405],{},"\"TableName\"",". The cells and their values stay; the table object, its style and its filter buttons go.",[10,2408,2409,2412,2413,2416],{},[2340,2410,2411],{},"Why do my formulas show errors after removing the table?","\nThey use structured references such as Table",[44,2414,2415],{},"Column",", which point at the table by name. Once the table is gone the name no longer exists. Rewrite them as ordinary cell references before deleting the table.",[10,2418,2419,2422],{},[2340,2420,2421],{},"Does openpyxl have a Convert to Range function?","\nNo. openpyxl removes table objects but does not rewrite formulas. Translate structured references yourself, as shown on this page, then delete the table.",[10,2424,2425,2428],{},[2340,2426,2427],{},"How do I keep the table's colours after converting?","\nThe colours come from the table style, not the cells. Write equivalent fills and fonts into the header and data cells, or use conditional formatting for banding so it adapts when rows change.",[30,2430,2432],{"id":2431},"related","Related",[2334,2434,2435,2441,2448,2455],{},[2337,2436,2437,2438,2440],{},"Up one level: ",[24,2439,27],{"href":26}," — tables, filters and outlines.",[2337,2442,2443,2447],{},[24,2444,2446],{"href":2445},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fcreate-an-excel-table-with-python\u002F","Create an Excel Table with Python"," — the other direction.",[2337,2449,2450,2454],{},[24,2451,2453],{"href":2452},"\u002Fgetting-started-with-python-excel-automation\u002Fworking-with-excel-formulas-in-python\u002Fuse-structured-table-references-in-formulas-from-python\u002F","Use Structured Table References in Formulas from Python"," — how the references this page removes are written.",[2337,2456,2457,2461],{},[24,2458,2460],{"href":2459},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fadd-an-autofilter-to-an-excel-sheet-with-openpyxl\u002F","Add an AutoFilter to an Excel Sheet with openpyxl"," — filter buttons without a table.",[2463,2464,2465],"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 .s_Opv, html code.shiki .s_Opv{--shiki-default:#6F42C1;--shiki-dark:#DBB7FF}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}html pre.shiki code .s_b0D, html code.shiki .s_b0D{--shiki-default:#22863A;--shiki-default-font-weight:bold;--shiki-dark:#72F088;--shiki-dark-font-weight:bold}",{"title":40,"searchDepth":229,"depth":229,"links":2467},[2468,2469,2470,2471,2472,2473,2474,2475,2476,2477,2478],{"id":32,"depth":229,"text":33},{"id":195,"depth":229,"text":196},{"id":580,"depth":229,"text":581},{"id":1303,"depth":229,"text":1304},{"id":1833,"depth":229,"text":1834},{"id":2197,"depth":229,"text":2198},{"id":2319,"depth":229,"text":2320},{"id":2331,"depth":229,"text":2332},{"id":2378,"depth":229,"text":2379},{"id":2395,"depth":229,"text":2396},{"id":2431,"depth":229,"text":2432},"2026-09-29","Do from Python what Excel's \"Convert to Range\" does: remove a table object with openpyxl, rewrite the structured references that would otherwise break into ordinary A1 references, keep the banded look by writing it into the cells, keep an AutoFilter if one is wanted, and check with a recalculation that every formula still gives the same answer.","md",[2483,2485,2487,2489],{"q":2401,"a":2484},"Delete it from the worksheet's tables dictionary: del ws.tables[\"TableName\"]. The cells and their values stay; the table object, its style and its filter buttons go.",{"q":2411,"a":2486},"They use structured references such as Table[Column], which point at the table by name. Once the table is gone the name no longer exists. Rewrite them as ordinary cell references before deleting the table.",{"q":2421,"a":2488},"No. openpyxl removes table objects but does not rewrite formulas. Translate structured references yourself, as shown on this page, then delete the table.",{"q":2427,"a":2490},"The colours come from the table style, not the cells. Write equivalent fills and fonts into the header and data cells, or use conditional formatting for banding so it adapts when rows change.","convert an excel table back to a normal range",null,{"breadcrumb":2494},[2495,2498,2501],{"name":2496,"item":2497},"Home","\u002F",{"name":2499,"item":2500},"Formatting and Charting Excel Reports with Python","\u002Fformatting-and-charting-excel-reports-with-python\u002F",{"name":27,"item":26},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fconvert-an-excel-table-back-to-a-normal-range",{"title":2504,"description":2505},"Convert an Excel Table to a Normal Range with openpyxl","Remove an Excel table with openpyxl (del ws.tables[name]) without breaking formulas: translate Table[[#This Row],[Col]], [@Col] and Table[Col] to A1 references, bake the table style into cell fills, re-add an autofilter and verify with LibreOffice.","convert-an-excel-table-back-to-a-normal-range","formatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fconvert-an-excel-table-back-to-a-normal-range\u002Findex",[2509,2510],"tables-and-filters","openpyxl","how-to","QSLHvf2DzoeW37nCHeAl8CUv9694UNutyKseZF7hWIk",[2514,2518],{"title":2515,"path":2516,"stem":2517,"children":-1},"Choose and Customise Excel Table Styles with Python","\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fchoose-and-customise-excel-table-styles-with-python","formatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fchoose-and-customise-excel-table-styles-with-python\u002Findex",{"title":2519,"path":2520,"stem":2521,"children":-1},"Convert Several Ranges into Excel Tables at Once","\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fconvert-several-ranges-into-excel-tables-at-once","formatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fconvert-several-ranges-into-excel-tables-at-once\u002Findex",[2523,2525],{"path":2524,"title":27},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python",{"path":2526,"title":2499},"\u002Fformatting-and-charting-excel-reports-with-python",[],[2529,2532,2535,2538,2541,2544],{"path":2530,"title":2531,"kind":2511},"\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":2533,"title":2534,"kind":2511},"\u002Fautomating-reporting-workflows\u002Fautomating-excel-online-with-microsoft-graph\u002Fsort-and-filter-an-excel-online-table-with-microsoft-graph","Sort and Filter an Excel Online Table with Microsoft Graph",{"path":2536,"title":2537,"kind":2511},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fbuilding-excel-reports-with-xlsxwriter\u002Fwrite-an-excel-table-with-formula-columns-using-xlsxwriter","Write an Excel Table with Formula Columns Using XlsxWriter",{"path":2539,"title":2540,"kind":2511},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-charts-in-excel-with-openpyxl\u002Fmake-an-excel-chart-grow-with-its-data","Make an Excel Chart Grow with Its Data",{"path":2542,"title":2543,"kind":2511},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fadd-a-total-row-to-an-excel-table","Add a Total Row to an Excel Table with Python",{"path":2545,"title":2546,"kind":2511},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fadd-an-autofilter-to-an-excel-sheet-with-openpyxl","Add an Autofilter to an Excel Sheet with openpyxl",1790972116419]