DocsFileSmart Export Table

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

RunMacro Smart Export Table command configuration dialog showing parameter fields
Configuration dialog and parameter fields for the Smart Export Table command in RunMacro.
  1. In RunMacro, select the File › Smart Export Table command.
  2. Click 🎯 Pick Table/DataGrid and left-click the target table in your desktop app.
  3. Select destination under Save to: variable, excel, csv, or txt.
  4. If exporting to file, provide the destination path in File path (e.g. C:\Reports\Invoices.xlsx).
  5. Check Has headers if the first row contains column headers.
  6. Set Max rows (enter 0 for unlimited extraction).
  7. Click Save to insert the command into your workflow.

Options reference

🎯 Pick Table/DataGrid

Target picker overlay to extract UIA Automation ID, Control Type, and Window properties of the target table.

Save to

Target storage: variable (stores structured array in variable), excel (creates .xlsx), csv (creates .csv), or txt (tab-delimited file).

Variable Name

Variable identifier when Save to is set to variable (default table_data), accessible downstream via {table_data}.

File Path

Absolute path to output file (supports dynamic variables such as C:\Data\export_{date}.xlsx).

Has headers

Treats the top row as column headers to format CSV/Excel columns and JSON object dictionary keys.

Max rows

Caps total rows to scrape. Enter 0 to scrape all available table rows without limits.

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

  1. Add a Smart Export Table command.
  2. Pick the orders DataGrid in the POS desktop application.
  3. Set Save to: Excel and path to D:\Orders\TodayOrders.xlsx.
  4. Set Max rows to 200 and enable Has headers.
  5. 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

RunMacro robot

Robots do the work. Your time is yours.

Create a robot in minutes, no coding needed. Reliable execution, remote management, transparent costs — and you always stay in control.