Extract Desktop UI Tables to Excel & CSV (Smart Export Table) in RunMacro
Desktop ModeRunMacro 3.5+
Smart Export Table extracts tabular data (DataGrids, Tables, ListViews) from desktop apps into Excel, CSV, or memory variables via Windows UI Automation, even if the app lacks an export feature.
Dialog & quick setup

- In RunMacro, select the File › Smart Export Table command.
- Click 🎯 Pick Table/DataGrid and left-click the target table in your desktop app.
- Select destination under Save to: variable, excel, csv, or txt.
- If exporting to file, provide the destination path in File path (e.g.
C:\Reports\Invoices.xlsx). - Check Has headers if the first row contains column headers.
- Set Max rows (enter
0for unlimited extraction). - Click Save to insert the command into your workflow.
Options reference
Modes & when to use
Desktop Mode
Reads structured rows and columns via UIA TablePattern and GridPattern.
Best for
- Extracting inventory reports and invoice lists from legacy desktop software that lack an export button.
- Extracting banking transaction statements, payroll sheets, or reconciliation grids into external files.
- Loading table data into a JSON workflow variable to iterate through rows and automate subsequent actions.
- Scheduling recurring automated backups of desktop management grids into standardized CSV archives.
Use an alternative when
- Scraping tables from web browsers (use Smart HTML Table extraction instead).
- Scanned raster table images (use Scan OCR instead).
Before you run
- The target desktop application displaying a table is running.
- The grid control is targeted using the Pick Table button.
Example workflow
Example: Export 200 sales orders from POS app to Excel
- Add a Smart Export Table command.
- Pick the orders DataGrid in the POS desktop application.
- Set Save to: Excel and path to
D:\Orders\TodayOrders.xlsx. - Set Max rows to 200 and enable Has headers.
- Execute — all 200 orders are written into an Excel spreadsheet in seconds.
Expected result: An Excel (.xlsx) or CSV file is generated with populated rows and columns, or a variable is assigned the table array.
Tips & limitations
When saving to a variable, pair it with a For Each Row loop to iterate through every record programmatically.
For UI Virtualized tables that only render on-screen rows, combine with Smart Scroll to load all records prior to extraction.
- Custom canvas-drawn grids without UIA support require OCR region scanning.
- Extremely large tables with millions of rows should specify Max Rows to conserve memory.
Applies to RunMacro 3.5+ · Desktop Mode · Windows 10/11
