Adding the rows in to the excel

Hi All,

BOT will create the user ID’s from a portal then BOT needs to write the created ID’s in to the excel.
I meant After creating the user ID from a portal I want to write the created user into the excel how to write that (suppose if only one user to be created then i can write into a excel but if more than one user to be created then how to write the many created Users into excel whether using Append range or only using write range)
Please some help me to resolve this.


1 Like


Do you want to write only User IDs into Excel file or any other also want to write along with User ID ?

Workforce id Domain ID First Name Last Name Location Code Location Zone Region Hub Reporting Manager ID Reporting Manager Name Department Product Job Role
74557 ravi.sing ravi sing 4605 CONNAUGHT PLACE BRANCH Kannauj Anna nagar Indore - Annapurna Road 8909 Vivek Tandon Credit Acceptance and Control Credit - Housing CU
74558 akash.sing akash sing 4605 CONNAUGHT PLACE BRANCH Kannauj Anna nagar Indore - Annapurna Road 8909 Vivek Tandon Credit Acceptance and Control Credit - Housing RO

the final data will be like that

I mean the final output

add the data to datatable during the loops
on end write datatable to excel


Are you getting all these details from Portal ?

yes I am getting from the portal after creating each user I need to write into an excel.
I User data can be 1 or 1000 etc

I mean the data may vary based on the requirement


  1. Use Build DataTable activity and create DataTable with all required columns.

  2. And then create one by one user in portal add the values to the DataTable using Add DataRow activity.

  3. Finally use Write Range activity to write into DataTable.

Note: if excel file already contains some data then use Append Range activity instead of Write Range activity.

1 Like

Ok will try and update you.

Dear Naveen,
Build a datatable,each time you create an user add the respective details to this datatable.
At the end Use write range and pass this table to excel.
If you are using existing excel then use append range,if excel is not empty else write range

Thanks and Regards,
Geetishree Rao

1 Like


Hope the below steps would help you resolve this

  1. Use a BUILD DATATABLE activity and create a datatable you want with column structure as needed
    And get the output as dt

  2. Now you will be having a sequence next to get the data from web page portal
    And will be saving each value to individual variables like var1, var2, var3,…

  3. Along with those assign activity use a ADD DATAROW activity where pass the input like this

In ArrayRow property
{var1.ToString, var2.ToString, var3.ToString,…,VarN.ToString}

And in datatable mention as dt

  1. Then we can use write range activity where dt as input and enable add headers property

Cheers @HeartCatcher

1 Like

Thanks everyone for your valuable response every solution helped me thank again

1 Like

It is working perfectly but while appending it is writing the data as in the screenshot.Ple

ase guide me how to resolve it.
Please guide me how to resolve it.
It is not writing one by one line instead it is writing alternative lines.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.