top of page

How to read a large Excel file faster

💡 If you need to read a large Excel file containing a lot of data, you should consider using the database actions instead of the usual Excel actions.

Problem Description


Say you need to read a large Excel file containing a lot of data.

Work Orders.xlsx


What most people will do is to make use of the following Excel actions:



One issue is that the processing speed tends to deteriorate the larger the Excel file gets. For example, it is not uncommon to take minutes to read an Excel file containing thousands of rows of data.

Solution


A speedier and simpler solution is to make use of the database actions instead.

First, we will use the Set variable action to define the full file path of the Excel file to be read.



Next, the action Open SQL connection will be used to open a new connection to a database, in this case, our Excel file.




Note that you will need to input the following as the connection string:

Provider=Microsoft.ACE.OLEDB.12.0;Data Source=%ExcelFile%;Extended Properties="Excel 12.0 Xml;HDR=YES";

💡Pro tip: If you encounter the error message “Can't connect to data source The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine.”, it means you may need to install Microsoft Access Database Engine 2010 Redistributable first.


Then, use the action Execute SQL statement.



To read all the data from the Excel file, copy and paste the following SQL query to the SQL statement field:

Select * from [Sheet1$];

Finally, it it highly recommended to close the database connection using the Close SQL connection action.



Additional Information


  • Last updated on: 11 Feb 2023

  • Tested version(s): 2.28.135.23016

  • Prerequisites: Excel

  • Dependencies: None

  • Known issues: None

References


  • Nil

Robotic Process Automation Singapore

CFB Bots is a leading technology service provider in the fast-growing field of Intelligent Automation. We partner with large enterprises in their Digital Transformation journey and help them and their employees thrive in the Future of Work.

NAVIGATE
CONTACT US
STAY CONNECTED

Singapore

CFB Bots Pte Ltd

Registration No.: 201705263H

77 High Street

#05-09, High Street Plaza

Singapore 179433

T: +65 6909 2099

E: enquiries@cfb-bots.com

Malaysia

CFB Bots Sdn Bhd

Registration No.: 202401045826 (1591672-X)

Suite: 33-01, 33rd Floor

Menara Keck Seng

203 Jalan Bukit Bintang

55100 Kuala Lumpur

T: +60 39 388 0352

E: my@cfb-bots.com

Australia

T: +61 2 8880 5998

E: au@cfb-bots.com

Join our mailing list to get the latest insights on automation

  • LinkedIn Social Icon
  • Facebook Social Icon
  • Twitter Social Icon
  • Instagram Social Icon
  • YouTube Social  Icon
TS Master Logo.png

© 2017-2025 CFB Bots Pte Ltd. All Rights Reserved. Tel: (65) 6909 2099 | Email: enquiries@cfb-bots.com | Privacy Policy | Terms of Use

bottom of page