Resources

Knowledge Base

Export Data From Database to CSV file

db1-1

  • To be able to run this example you need to install UiPath.Excel.Activities and UiPath.Database.Activities. See more details on how to install packages here.

Task

This sample extracts information from a database and put them into a CSV file.

Steps to automate

  1. Connect to the database.
  2. Specify the columns that you want to extract from the database.
  3. Put the information extracted into CVS file.

Solution

  1. Connect to a database using "Connect" activity. You will need a server name, username and password.
  2. Use an "Execute query" activity to specify the name of the database and the columns that you want to extract.
  3. "Execute query"  activity returns a datatable so you have to use a "Write CSV" activity to take all the information from datatable and write into CVS file.

db2

db3