All templates
Excel AutomationBeginner
Launch Excel and Extract Table
Robomotion•Updated 9 months ago

Overview
Opens an Excel workbook and reads its first table into a structured message variable. Ideal starting point for data-driven flows.
Launch Excel and Extract Table
The most common way to store structured data into Excel is using tables. Robomotion enables you to retrieve data from whole tables or select specific rows and columns.
What Launch Excel and Extract Table can do
Download Fixturessubflow thenBuild Default Path(Core.Programming.Function) setsmsg.default_excel_path = $Home$/templates/excel-automation/launch-excel-and-extract-table/fixtures/sample.xlsxand initialisesmsg.retry_count = 0.Core.Dialog.InputBoxtitledLaunch Excel and extract tablepromptsSelect the excel file to extract table from...→msg.selected_file.Validate(Core.Programming.Function,outputs: 2) — requiresmsg.selected_fileto match/\.xl\w*$/i; otherwise falls through toCore.Flow.Stop.Robomotion.MicrosoftExcel.OpenExcelopens the file withoptVisible: true→msg.excel_app_id, thenRobomotion.MicrosoftExcel.GetRangewithoptRange: 'All-Range'andoptHeaders: falsereads the used range →msg.excel_table, followed byRobomotion.MicrosoftExcel.CloseExcel.Stringify Table(Core.Programming.Function) joins each row with\tand rows with\nintomsg.excel_text, thenCore.Dialog.MessageBoxtitledExcel table values extracted:shows the result.Core.Trigger.CatcharoundOpen Excel— incrementsmsg.retry_count, sleeps 2s,Core.Flow.GoToback to theRetry Pointlabel; after one retry it stops withfailed.
Behind the scenes
optRange: 'All-Range'asks the Excel node for the entire used range in one call, so there is no need to compute free row/column bounds manually.Stringify Tablenormalises both array-of-arrays and array-of-objects shapes before rendering, so the dialog copes with either header or no-header extractions.- The single-retry pattern (
Core.Trigger.Catch+Core.Flow.Label+Core.Flow.GoTo) handles transient Excel COM startup failures while still bounding the retry cost. Close Excelruns before the dialog, so the dialog never blocks the Excel process during display.
More excel automation templates
See all 5 →- Consolidate Excel ReportsCombines rows from multiple Excel workbooks in a folder into one consolidated sheet. A reporting helper that removes repetitive copy-paste work.
- Launch ExcelOpens Microsoft Excel and creates a new empty workbook. Starter template for any Excel automation.
- Manipulate Excel Data Using SQLLoads Excel data into an in-memory SQL engine and runs a SELECT / UPDATE statement against it. Gives you database-level expressiveness over spreadsheet data.
- Search and Replace Excel ValuesPerforms a find-and-replace across an Excel worksheet and saves the result. Handy for bulk corrections or masking sensitive fields.