Topic area
Driving Excel itself
When the file is not enough and you need the Excel application — on the desktop or online.
Topics in driving excel itself
Each topic page gathers every guide, how-to, comparison and fix on its subject.
- xlwingsReading and writing a live workbook, calling Python from Excel, refreshing pivots.
- COM & pywin32win32com on Windows: ranges, refreshes, dialogs and closing Excel cleanly.
- Macros & VBARunning macros from Python, keeping .xlsm files intact, and replacing VBA with Python.
- Excel Online & Microsoft GraphWorkbooks in SharePoint and OneDrive, edited in place through the Graph API.
xlwings
- GuideAutomating Excel With xlwings: The Basics
- How-toControl How xlwings Converts DataFrames and Ranges
- How-toFormat Cells in a Live Workbook with xlwings
- How-toInsert a matplotlib Plot into a Live Workbook with xlwings
COM & pywin32
- GuideAutomating Excel with COM and pywin32
- How-toTest win32com and xlwings Code Without Excel
- How-toAutomate Excel on macOS with Python
- How-toClose Excel Cleanly and Avoid Orphan COM Processes
Macros & VBA
- How-toAdd a VBA Macro to a Workbook with xlsxwriter
- How-toExtract VBA Macro Code from an Excel File
- How-toRun an Excel Macro from Python with win32com
- How-toCall Python from Excel with an xlwings UDF
Excel Online & Microsoft Graph
- GuideAutomating Excel Online with Microsoft Graph
- How-toAdd a Chart to an Excel Online Workbook with Microsoft Graph
- How-toAdd, Rename and Delete Worksheets with Microsoft Graph
- How-toAppend Rows to an Excel Online Table with Microsoft Graph
Other areas