How to write data to excel

Hi team ,
please help me out
ExtractCandidateData.xaml (42.4 KB)
I am sharing my code here
I am featching the email id of each candidate in for using gettext method now i want to store that into excel with column name Email Address
please guys help me out on urgent basis

Hi @Sandhya_Gajare ,

I was unable to open your file, but try following the below steps -

  1. You have to define a new data table using Build Data table activity with “Email Address” as column name
  2. After fetching the email address using gettext, you should add the email to datatable using “Add data Row” activity
  3. After all the emails are extracted, proceed to write the datatable to excel using “Write Range” workbook activity.

Hope this helps!

can you give me example according to my code plz

ExtractCandidateData.xaml (40.1 KB)
i am share here my code again

Watch this video you will get the idea,vid:E6BSYodzyUI


Use Write cell with Index from the for loop to change the value of the cell

"B" +(Index+1).Tostring


1 Like

Hello @Sandhya_Gajare

You can use Write Cell activity and then iterate the index of the range. For example if you are writing to C column , use a counter variable and increate the value. i is an integer variable with 1 as the default value.


Then use an assign activity and increase the i value. i=i+1

Hi @Sandhya_Gajare ,

You are fetching candidate mail Id’s via get text method. At a time you will get single Mail Id or multiple Mail id? If mutiple Id then use for each activity, if you are getting single then use write cell, increasing counter. I have attached simple snap’s to this please have look on it. Let me know is this works for you or Not?

Pavan Kumar

example plz

Excel_Application_Scope_and_Workbook_Activities - Copy.xaml (4.9 KB)
Reference xaml file

1 Like

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