Excel Reader to Datatable
Opens an Excel workbook, reads data into a PAD DataTable, and closes cleanly without leaving zombie Excel processes.
Sign in or create a free account to copy this script.
Provided as-is, without warranty of any kind. Review and test each pattern in a non-production environment before deploying it to live automations. See our Terms.
Problem this solves
Forum #1 pain point: getting data out of Excel reliably without leaving zombie processes.
Usage Notes
- 1.Set varExcelFilePath to the full path of your Excel file before running.
- 2.FirstLineIsHeader: True creates named columns.
- 3.Always include the Excel.CloseExcel.Close pattern.
- 4.Open with ReadOnly: True and Visible: False.
- 5.Run Variables.DeleteEmptyRowsFromDataTable after every read.
Requirements
- Power Automate Desktop 2.30+
- Variables: varExcelFilePath (Text), ExcelInstance (Excel Instance), varExcelData (DataTable)
Dependencies
- Excel Bulk Writer (No Loop)
- Large Datatable Streamer