Articles → AUTOMATION ANYWHERE → Excel as a database in A2019

Excel as a database in A2019






Prerequisite





Sample Excel




Picture showing the sample excel to be read as a database

Click to Enlarge


Example













Connect to excel






Picture showing the Connect action in the Database activity

Click to Enlarge



Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Users\karan\OneDrive\Desktop\a.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES;IMEX=1"


Picture showing setting the connection string and connection mode of the connect action

Click to Enlarge


Export data to datatable






Picture showing the Export to data table action from the Database command.

Click to Enlarge



Picture showing the select query in export to data table

Click to Enlarge


Loop through all the rows of the datatable.




Picture showing the loop for iterating through the datatable

Click to Enlarge


Output





Posted By  -  Karan Gupta
 
Posted On  -  Sunday, December 27, 2020

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250