[{"data":1,"prerenderedAt":163},["ShallowReactive",2],{"topic:xlsxwriter":3},[4,14,22,28,33,38,44,49,54,60,65,70,75,80,85,90,96,102,108,113,118,124,130,136,141,146,151,156],{"path":5,"title":6,"description":7,"type":8,"topics":9,"kind":13},"\u002Fautomating-reporting-workflows\u002Fbuilding-finance-and-operations-reports\u002Fbuild-a-budget-vs-actual-variance-report","Build a Budget vs Actual Variance Report in Excel with Python","Turn monthly actuals and a budget into the variance report finance reviews every month: month and year-to-date side by side, revenue and cost sections with subtotals and a net line, variances as live formulas where positive means favourable, unfavourable lines in red and a comment column for the reviewer.","how-to",[10,11,12],"report-layouts","excel-formulas","xlsxwriter",null,{"path":15,"title":16,"description":17,"type":18,"topics":19,"kind":13},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fbuilding-excel-reports-with-xlsxwriter","Building Excel Reports with xlsxwriter","The write-only engine that formats fastest: reusable format objects, column-level formatting, charts, conditional formats, panes and constant-memory mode — and exactly when openpyxl is still the right choice.","guide",[12,20,21],"writing-excel","cell-styling",{"path":23,"title":24,"description":25,"type":8,"topics":26,"kind":13},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fbuilding-excel-reports-with-xlsxwriter\u002Fadd-a-chart-to-an-excel-file-with-xlsxwriter","Add a Chart to an Excel File with xlsxwriter","Insert a real Excel chart from Python: series built from row counts, axis and label formatting, a combined column-and-line chart on a secondary axis, and placement that survives changing data.",[27,12],"charts-and-images",{"path":29,"title":30,"description":31,"type":8,"topics":32,"kind":13},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fbuilding-excel-reports-with-xlsxwriter\u002Fadd-sparklines-to-an-excel-report-with-xlsxwriter","Add Sparklines to an Excel Report with xlsxwriter","Put a trend in every row: xlsxwriter sparklines — line, column and win\u002Floss types, high and low markers, shared axes across rows, styling, and the openpyxl caveat.",[27,12],{"path":34,"title":35,"description":36,"type":8,"topics":37,"kind":13},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fbuilding-excel-reports-with-xlsxwriter\u002Fadd-text-boxes-and-shapes-to-excel-with-xlsxwriter","Add Text Boxes and Shapes to Excel with XlsxWriter","Float commentary, notes and labels over an Excel report with XlsxWriter insert_textbox: size, fill, border and font options, multi-line and rotated text, gradient fills and hyperlinks, text linked to a cell (and why it shows empty in LibreOffice), placing a box below a table of any length, and when a formatted cell is the better choice.",[10,12],{"path":39,"title":40,"description":41,"type":8,"topics":42,"kind":13},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fbuilding-excel-reports-with-xlsxwriter\u002Fapply-conditional-formatting-with-xlsxwriter","Apply Conditional Formatting with xlsxwriter","Write rules Excel re-evaluates: cell and text criteria, colour scales and data bars, a formula rule that highlights whole rows, and the absolute-reference trap that makes a row rule follow the wrong column.",[43,12],"conditional-formatting",{"path":45,"title":46,"description":47,"type":8,"topics":48,"kind":13},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fbuilding-excel-reports-with-xlsxwriter\u002Fbuild-a-waterfall-chart-in-excel-with-python","Build a Waterfall Chart in Excel with Python","Show how an opening figure becomes a closing one — revenue bridges, budget walks, cash movements — as a waterfall chart built with xlsxwriter. Uses the stacked-column technique with an invisible base, formula-driven helper columns that update when inputs change, green and red steps, total bars and value labels.",[27,12],{"path":50,"title":51,"description":52,"type":8,"topics":53,"kind":13},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fbuilding-excel-reports-with-xlsxwriter\u002Fcombine-chart-types-and-chartsheets-with-xlsxwriter","Combine Chart Types and Chartsheets with XlsxWriter","Build combination charts and full-page chartsheets with XlsxWriter: columns and a line in one chart with the line on a secondary axis, a stacked column chart with a total line, charts fed from a pandas summary written to a data sheet, chartsheets that show one chart per tab, and checks of the generated chart XML so a broken chart is caught before anyone opens the file.",[12,27],{"path":55,"title":56,"description":57,"type":8,"topics":58,"kind":13},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fbuilding-excel-reports-with-xlsxwriter\u002Fdefine-names-and-protect-sheets-with-xlsxwriter","Define Names and Protect Sheets with XlsxWriter","Build an input template with XlsxWriter in which formulas use defined names instead of cell addresses and only the input cells can be edited: workbook and sheet-scoped names for ranges and constants, a dropdown fed by a named list on a hidden sheet, unlocked input cells, hidden formulas, protect() options that still allow sorting and filtering, and a check of the result with openpyxl and LibreOffice.",[12,59],"protection-and-sharing",{"path":61,"title":62,"description":63,"type":8,"topics":64,"kind":13},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fbuilding-excel-reports-with-xlsxwriter\u002Ffreeze-panes-and-set-zoom-with-xlsxwriter","Freeze Panes and Set Zoom with XlsxWriter","Control how each sheet of an XlsxWriter report opens: freeze the header row and the first column, split panes instead of freezing, set the zoom per sheet, hide gridlines, choose which sheet and cell are active, scroll the view to a starting cell, colour the tabs, and check every view setting by reading the file back with openpyxl.",[12,10],{"path":66,"title":67,"description":68,"type":8,"topics":69,"kind":13},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fbuilding-excel-reports-with-xlsxwriter\u002Finsert-checkboxes-with-xlsxwriter","Insert Checkboxes in Excel with xlsxwriter","Turn a column of TRUE\u002FFALSE values into clickable checkboxes — a month-end close checklist, a review sign-off column, a to-do list. Use xlsxwriter's insert_checkbox, count and percentage-complete formulas that show the right value before recalculation, strike through finished rows with conditional formatting, read the ticks back, and fall back gracefully where checkboxes are not supported.",[12,10],{"path":71,"title":72,"description":73,"type":8,"topics":74,"kind":13},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fbuilding-excel-reports-with-xlsxwriter\u002Flabel-chart-points-from-cell-values-with-xlsxwriter","Label Chart Points from Cell Values with XlsxWriter","Put product names, regions or comments on chart points instead of bare numbers: XlsxWriter custom data labels that reference cells (shown by Excel, ignored by LibreOffice), a portable one-series-per-point technique whose series-name labels render everywhere, labelling only the points that matter, labels from a different column on a column chart, and a test that the labels are really drawn.",[27,12],{"path":76,"title":77,"description":78,"type":8,"topics":79,"kind":13},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fbuilding-excel-reports-with-xlsxwriter\u002Fset-print-options-headers-and-footers-with-xlsxwriter","Set Print Options, Headers and Footers with XlsxWriter","Make an XlsxWriter report print properly: landscape A4, fit to one page wide, repeat the header row on every page, set the print area and margins, add page breaks between groups, and write headers and footers with the report name, page X of Y, the print date and a logo — then check the printed result by exporting it to PDF.",[12,10],{"path":81,"title":82,"description":83,"type":8,"topics":84,"kind":13},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fbuilding-excel-reports-with-xlsxwriter\u002Fstore-formula-results-with-xlsxwriter","Store Formula Results with xlsxwriter So Every Viewer Shows Values","xlsxwriter writes formulas with a cached result of 0, so pandas, openpyxl, previewers and even LibreOffice's command-line conversion show zeros until Excel recalculates. Compute the results in Python and store them with the formula, keep them consistent, and stop text that starts with \"=\" from becoming a formula.",[11,12],{"path":86,"title":87,"description":88,"type":8,"topics":89,"kind":13},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fbuilding-excel-reports-with-xlsxwriter\u002Fwrite-a-formatted-excel-report-with-xlsxwriter","Write a Formatted Excel Report with xlsxwriter","Build a complete styled report in one pass: a title block, a header row you control, column formats and widths, a totals row, banded rows, an autofilter and frozen panes.",[20,12,21],{"path":91,"title":92,"description":93,"type":8,"topics":94,"kind":13},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fbuilding-excel-reports-with-xlsxwriter\u002Fwrite-a-million-rows-to-excel-with-xlsxwriter-constant-memory","Write a Million Rows to Excel with xlsxwriter","Constant memory mode explained: what it costs, why rows must be written in order, where the temporary files go, how to split past Excel's 1,048,576-row limit, and when a CSV is the honest answer.",[95,20,12],"large-files",{"path":97,"title":98,"description":99,"type":8,"topics":100,"kind":13},"\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.",[12,101],"tables-and-filters",{"path":103,"title":104,"description":105,"type":8,"topics":106,"kind":13},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fbuilding-excel-reports-with-xlsxwriter\u002Fwrite-dates-times-and-durations-with-xlsxwriter","Write Dates, Times and Durations with XlsxWriter","Write dates, times and durations to Excel correctly with XlsxWriter: why a date written without a format appears as 46297, setting a default date format, handling the timezone error by converting before stripping, durations over 24 hours with [h]:mm, times of day, dates before 1900, and the same settings through pandas' ExcelWriter.",[12,107],"number-formats",{"path":109,"title":110,"description":111,"type":8,"topics":112,"kind":13},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fbuilding-excel-reports-with-xlsxwriter\u002Fwrite-rich-text-in-a-cell-with-xlsxwriter","Write Rich Text with Mixed Formats in One Cell with xlsxwriter","Put bold labels, coloured status words, superscripts and line breaks inside a single Excel cell with xlsxwriter's write_rich_string — the argument order, the silent return codes when a string is rejected, combining with pandas output, and keeping rich text intact when openpyxl edits the file later.",[21,12],{"path":114,"title":115,"description":116,"type":8,"topics":117,"kind":13},"\u002Fformatting-and-charting-excel-reports-with-python\u002Finserting-images-and-logos-into-excel\u002Fembed-images-inside-cells-with-xlsxwriter","Embed Images Inside Cells with xlsxwriter","Put a product photo or status icon inside a cell rather than floating over the grid, so it sorts, filters and resizes with its row. Use xlsxwriter's embed_image, and know how it differs from insert_image.",[27,12],{"path":119,"title":120,"description":121,"type":8,"topics":122,"kind":13},"\u002Fformatting-and-charting-excel-reports-with-python\u002Fstyling-excel-cells-with-openpyxl\u002Fchange-the-default-font-of-an-excel-workbook-with-python","Change the Default Font of an Excel Workbook with Python","Make a generated workbook use your house font everywhere — not just in the cells you styled: set XlsxWriter's default_format_properties (also through pandas), understand why changing the Normal style in openpyxl does nothing to existing cells, use a template so openpyxl inherits the right default, keep bold and coloured cells in the same family, and verify the fonts that actually render.",[21,123,12],"openpyxl",{"path":125,"title":126,"description":127,"type":8,"topics":128,"kind":13},"\u002Fgetting-started-with-python-excel-automation\u002Fautomating-excel-with-com-and-pywin32\u002Fadd-a-vba-macro-to-a-workbook-with-xlsxwriter","Add a VBA Macro to a Workbook with xlsxwriter","Ship a macro-enabled .xlsm report from Python: extract a vbaProject.bin once from a workbook saved in Excel, attach it to every new file with xlsxwriter, wire a button to a macro, keep the workbook and sheet code names consistent, and check the result without opening Excel.",[129,12],"macros-and-vba",{"path":131,"title":132,"description":133,"type":8,"topics":134,"kind":13},"\u002Fgetting-started-with-python-excel-automation\u002Ftroubleshooting-common-python-excel-errors\u002Ffix-largezipfile-error-in-xlsxwriter","Fix \"Filesize would require ZIP64 extensions\" (LargeZipFile) in XlsxWriter","Very large exports fail at close() with xlsxwriter.exceptions.FileSizeError: Filesize would require ZIP64 extensions, raised from zipfile.LargeZipFile. Learn what crosses the limit (one XML part over 2 GiB, not the .xlsx file size), estimate when your export will hit it, turn on use_zip64 in XlsxWriter or through pandas, and when to split the data or choose another format instead.",[135,12,95],"troubleshooting",{"path":137,"title":138,"description":139,"type":8,"topics":140,"kind":13},"\u002Fgetting-started-with-python-excel-automation\u002Ftroubleshooting-common-python-excel-errors\u002Ffix-xlsxwriter-exception-caught-in-workbook-destructor","Fix xlsxwriter \"Exception caught in workbook destructor\"","The xlsxwriter message \"Exception caught in workbook destructor. Explicit close() may be required\" comes from versions before 1.1, where an unclosed workbook was saved when garbage collected. Current versions print nothing and write nothing instead. Close every workbook explicitly, handle FileCreateError, and avoid writing half-built reports from a with block.",[135,12],{"path":142,"title":143,"description":144,"type":8,"topics":145,"kind":13},"\u002Fgetting-started-with-python-excel-automation\u002Ftroubleshooting-common-python-excel-errors\u002Ffix-xlsxwriter-overwriting-an-existing-workbook","Fix XlsxWriter Overwriting an Existing Workbook","You pointed XlsxWriter — or pandas with its default engine — at an existing workbook to add a sheet, and every other sheet vanished. XlsxWriter only creates new files and never reads old ones. See why, what \"Append mode is not supported with xlsxwriter!\" means, how to add or replace a sheet with openpyxl's append mode and if_sheet_exists, and how to guard against overwriting a file by accident.",[135,12,20],{"path":147,"title":148,"description":149,"type":8,"topics":150,"kind":13},"\u002Fgetting-started-with-python-excel-automation\u002Fusing-openpyxl-for-excel-file-manipulation\u002Fset-workbook-properties-with-python","Set Workbook Properties Like Author and Title with Python","Give generated workbooks a proper title, author, company, keywords and custom properties such as the data source or row count. See what openpyxl and xlsxwriter can set, which fields each one overwrites on save, and how to read the properties back for auditing.",[10,123,12],{"path":152,"title":153,"description":154,"type":8,"topics":155,"kind":13},"\u002Fgetting-started-with-python-excel-automation\u002Fworking-with-excel-formulas-in-python\u002Fwrite-dynamic-array-formulas-with-python","Write Dynamic Array Formulas like FILTER and UNIQUE from Python","Write spilling Excel formulas — FILTER, UNIQUE, SORT, SEQUENCE, XLOOKUP — from Python so they work when the file opens. Why openpyxl output shows #NAME? or an @, what the _xlfn prefix and array metadata are, and how xlsxwriter handles both.",[11,123,12],{"path":157,"title":158,"description":159,"type":8,"topics":160,"kind":13},"\u002Fgetting-started-with-python-excel-automation\u002Fwriting-dataframes-to-excel-with-pandas\u002Fopenpyxl-vs-xlsxwriter-vs-pandas-excelwriter","openpyxl vs xlsxwriter vs pandas.ExcelWriter","Understand how pandas.ExcelWriter wraps the openpyxl and xlsxwriter engines, when each one wins, and write the same DataFrame three ways with a clear decision table.",[161,20,12,123,162],"choosing-libraries","pandas",1790972052271]