Example of migrating data from Excel to a database
- Updated: 2023/09/01
Example of migrating data from Excel to a database
In this example, you build a bot to transfer values from an Excel spreadsheet to a database using actions from the Database, Excel advanced, and Loop packages.
Prerequisites
Before you start building your bot, create the following:
- Create an Excel spreadsheet with the following values and save it (For example:
Test_migration_db.xlsx)
John Williams jwilliams@cmail.com Sam Li sam.li@xyz.org Carl Miller carl@carlmillerllc.com
- Create an Access database table named
CustomerT
with the following
columns: (create a database similar to the image below and save it - for
example: save it as Test_Migration_db.accdb)
- FirstName
- LastName
- Email
Procedure
To migrate values from a spreadsheet to a table in a database, perform the following steps:
-
Create a new bot:
-
Open the spreadsheet:
- Double-click or drag the action .
-
Click Browse to provide the file path.
- Select the option to open the file in Read-write.
-
Connect to the database:
- Double-click or drag the action.
-
Select the User defined connection mode.
- Select the Microsoft Access database type.
- Click Browse to provide the file path.
-
Insert the Excel values into the database, row by row:
- Disconnect from the database. Drag the action below the Loop container.
- Close the spreadsheet. Double-click or drag action.
- Click Save.