Guides
Practical guides for people who build and maintain Excel automations. Each one solves one task end to end, with code written for the guide and tested on a real machine, and says what it does not cover.
-
Run an Excel Macro from PowerShell with a Timeout
Run a trusted macro on a copy of the workbook, turn VBA errors into text instead of dialogs, stop at a time limit and close only the Excel your run started.
· PowerShell 7, VBA
-
Regression Test an Excel VBA Macro with a Golden File
Approve a report's values once, then compare every new run with them: rows matched by key, tolerances per column, empty is not zero, and a check that runs in CI.
· PowerShell 7, CSV, GitHub Actions
-
Excel VBA Version Control with Git: Export and Verify
Export every VBA module to text, keep line endings stable, review real diffs and check the export against a SHA256 manifest without Excel.
· PowerShell 7, git, GitHub Actions
-
PowerShell JSON to CSV Without Losing Columns
Export-Csv takes its columns from the first record and drops the rest silently. Keep every column, flatten nested fields, write numbers with a dot and check the file before success.
· PowerShell 7, JSON, CSV
-
PowerShell ConvertTo-Json Depth: Stop Losing Nested Data
ConvertTo-Json turns anything deeper than two levels into text, silently in Windows PowerShell 5.1. How levels are counted, three more ways the JSON changes, and a function that reads the JSON back before it writes the file.
· PowerShell 7 and 5.1, JSON
-
Excel VBA RefreshAll: Wait for Power Query and Catch a Failed Refresh
RefreshAll returns before background queries finish and stays silent when a source is missing. Refresh each query table in the foreground, check it, and save only then.
· VBA, Power Query
-
Close Only the Excel Your PowerShell Script Started
Stop-Process -Name EXCEL also closes the Excel someone has open, and Quit() alone can leave EXCEL.EXE running. Find your own Excel by its window, quit it in finally, and end only that process.
· PowerShell 7, Excel COM
-
Task Scheduler Says Success but Your PowerShell Script Failed
A cmdlet error, a failed program or a swallowed exception can all end with Last Run Result 0. What reaches Task Scheduler in PowerShell 5.1 and 7, a template that exits 1 on any error, and a daily check.
· PowerShell 7 and 5.1, Task Scheduler
-
Import VBA Modules and UserForms Without Breaking References
Import renames a module that already exists, a form without its .frx fails, ThisWorkbook code becomes a class and a missing reference stops everything. Import into a copy, restore the references and check by exporting again.
· PowerShell 7, Excel VBA
-
Clockify API Pagination to Excel: Read Every Page and Check What Is Missing
Read every page of a REST API by its Last-Page header, catch duplicates and running timers, and write hours per project to an Excel workbook.
· PowerShell 7, REST API, Excel
Written by SteadyLatch, which makes the Automation Reliability Kit for Excel and VBA automations. The guides stand on their own; each ends with one short note about the kit.