[{"data":1,"prerenderedAt":112},["ShallowReactive",2],{"topic:tables-and-filters":3},[4,13,19,25,31,37,44,49,54,59,64,70,75,80,85,90,97,102,107],{"path":5,"title":6,"description":7,"type":8,"topics":9,"kind":12},"\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","Keep highlighting working when a report table gets new rows every week: why conditional formatting ranges do not follow rows appended by Python, re-pointing every rule at the resized table with openpyxl, generous ranges as a simpler alternative and their cost, why structured references are not allowed in rule formulas, and a check that every rule covers every data row after an append.","how-to",[10,11],"conditional-formatting","tables-and-filters",null,{"path":14,"title":15,"description":16,"type":8,"topics":17,"kind":12},"\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","Sort and filter an Excel table in OneDrive or SharePoint from Python with Microsoft Graph: apply multi-column sorts, filter a column by values, custom criteria or top items, read back only the visible rows, clear filters again, and decide when it is better to read the rows and filter in pandas instead of changing the shared workbook.",[18,11],"excel-online",{"path":20,"title":21,"description":22,"type":8,"topics":23,"kind":12},"\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","Write a pandas DataFrame as a real Excel table with XlsxWriter, including calculated columns that use structured references, a totals row, column formats and a table style: get the range right, choose between the [@Column] shorthand and fully qualified references that also work outside Excel, add custom totals, and verify the formulas by recalculating.",[24,11],"xlsxwriter",{"path":26,"title":27,"description":28,"type":8,"topics":29,"kind":12},"\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","A chart points at fixed cell ranges, so rows appended by a script fall outside it. See the problem in a saved file, extend every series of an existing chart to the new last row with openpyxl, rebuild the chart from the data's current size instead, let Excel tables carry the chart when rows are added inside Excel, and know why dynamic named ranges are brittle in generated files.",[30,11],"charts-and-images",{"path":32,"title":33,"description":34,"type":35,"topics":36,"kind":12},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python","Creating Excel Tables and Autofilters with Python","Give readers a sheet they can slice — autofilters, real Excel tables with banded styles and structured references, sorted output, grouped rows and protected cells, all from openpyxl.","guide",[11],{"path":38,"title":39,"description":40,"type":8,"topics":41,"kind":12},"\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","Give an Excel table a real totals row from Python — the one readers can switch between Sum, Average and Count in Excel — with openpyxl's totalsRowCount and table column settings, SUBTOTAL formulas that respect filters, custom totals, the matching XlsxWriter options and how to keep the totals row out of pandas.",[11,42,43],"excel-formulas","openpyxl",{"path":45,"title":46,"description":47,"type":8,"topics":48,"kind":12},"\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","Set ws.auto_filter.ref so every data row is covered, freeze the header, apply it after pandas writes the sheet, and understand why recorded filter criteria hide nothing.",[11,43],{"path":50,"title":51,"description":52,"type":8,"topics":53,"kind":12},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fadd-calculated-columns-to-an-excel-table-with-python","Add Calculated Columns to an Excel Table with Python","Add a calculated column to an existing Excel table with openpyxl: find the table, widen its range and autofilter, register the new column with a calculated-column formula so Excel fills it into rows added later, write the formula into every row with portable structured references, add a total, and verify the results by recalculating.",[11,42],{"path":55,"title":56,"description":57,"type":8,"topics":58,"kind":12},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fappend-rows-to-an-excel-table-and-resize-it","Append Rows to an Excel Table and Resize It with openpyxl","Add new records to an existing Excel table so it grows the way it does when someone types below it: extend the table's range and filter, fill calculated columns with the correct structured-reference formula, carry number formats down, move the totals row, and extend dropdowns — so pivots, charts and formulas that use the table pick the rows up.",[11,43],{"path":60,"title":61,"description":62,"type":8,"topics":63,"kind":12},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fapply-autofilter-criteria-and-hide-rows","Apply Autofilter Criteria and Hide the Filtered Rows with openpyxl","openpyxl can record autofilter criteria, but it never hides a row — the file opens showing everything under a filter that claims otherwise. Write the criteria and hide the non-matching rows yourself so the workbook opens already filtered, with SUBTOTAL totals that match what readers see.",[11,43],{"path":65,"title":66,"description":67,"type":8,"topics":68,"kind":12},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fchoose-and-customise-excel-table-styles-with-python","Choose and Customise Excel Table Styles with Python","Pick the right look for an Excel table from Python: the 60 built-in styles and how their names work, the four banding and emphasis switches, styles in openpyxl and XlsxWriter, a custom company table style written with openpyxl, why typos in style names pass silently, and why LibreOffice and PDF conversions show tables unstyled unless you add direct formatting.",[11,69],"cell-styling",{"path":71,"title":72,"description":73,"type":8,"topics":74,"kind":12},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fconvert-an-excel-table-back-to-a-normal-range","Convert an Excel Table Back to a Normal Range","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.",[11,43],{"path":76,"title":77,"description":78,"type":8,"topics":79,"kind":12},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fconvert-several-ranges-into-excel-tables-at-once","Convert Several Ranges into Excel Tables at Once","Turn every block of data in a workbook into a proper Excel table in one pass with openpyxl: find the separate rectangular blocks on each sheet, check and repair their header rows so Excel will accept them, give each table a unique valid name from its sheet and heading, skip blocks that are too small or already tables, and verify that nothing overlaps.",[11,43],{"path":81,"title":82,"description":83,"type":8,"topics":84,"kind":12},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fcreate-an-excel-table-with-python","Create an Excel Table with Python","Build a real Excel table with openpyxl — Table and TableStyleInfo, header rules that prevent the repair dialog, structured references, extending the range, and reading existing tables.",[11,43],{"path":86,"title":87,"description":88,"type":8,"topics":89,"kind":12},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fgroup-and-outline-rows-in-excel-with-openpyxl","Group and Outline Rows in Excel with openpyxl","Add collapsible groups to a generated report: row and column outlines, nested levels, collapsed-by-default state, summary rows below or above, and subtotal formulas.",[11,43],{"path":91,"title":92,"description":93,"type":8,"topics":94,"kind":12},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fread-an-excel-table-by-name-into-pandas","Read an Excel Table by Name into pandas","pandas has no option to read an Excel table by its name, but openpyxl knows every table's exact range. Find a table anywhere in the workbook, skip its totals row, get formula results, and load it into a DataFrame.",[11,95,43,96],"reading-excel","pandas",{"path":98,"title":99,"description":100,"type":8,"topics":101,"kind":12},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Frename-and-restyle-existing-excel-tables","Rename and Restyle Existing Excel Tables","Give the Table1, Table2 and Table3 in an existing workbook meaningful names with openpyxl without breaking anything: rename the table object and its key, rewrite every structured reference to it in cell formulas, defined names, data validation and conditional formatting, refuse names that clash, then apply one table style across the workbook — checked by recalculating the formulas in LibreOffice before and after.",[11,43],{"path":103,"title":104,"description":105,"type":8,"topics":106,"kind":12},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fcreating-excel-tables-and-autofilters-with-python\u002Fsort-excel-rows-with-python-before-writing","Sort Excel Rows with Python Before Writing","openpyxl cannot sort a worksheet — order the data in pandas first. Multi-key sorts, custom category orders, natural sorting of codes, stable ties and where blanks end up.",[11,96],{"path":108,"title":109,"description":110,"type":8,"topics":111,"kind":12},"\u002Fgetting-started-with-python-excel-automation\u002Fworking-with-excel-formulas-in-python\u002Fuse-structured-table-references-in-formulas-from-python","Use Structured Table References in Excel Formulas from Python","Write formulas that refer to Excel table columns by name — =SUM(Sales[Total]), calculated columns, SUMIFS over table columns — from openpyxl and xlsxwriter, including the [@Column] shorthand that must be written out in full.",[42,11,43],1790972052271]