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
https://www.google.com/search?q=extract+email+subject+to+excel+using+uipath&rlz=1C1GCEU_enIN831IN831&ei=-AK0Y6z-OpSjz7sP_OyM6Ag&ved=0ahUKEwis2u2SmKv8AhWU0XMBHXw2A40Q4dUDCA8&uact=5&oq=extract+email+subject+to+excel+using+uipath&gs_lcp=Cgxnd3Mtd2l6LXNlcnAQAzIFCAAQogQyBQgAEKIEOhYIABDqAhC0AhCKAxC3AxDUAxDlAhgBOhMIABCPARDqAhC0AhCMAxDlAhgCOhYILhCPARDUAhDqAhC0AhCMAxDlAhgCOgQILhBDOgQIABBDOgUIABCRAjoKCAAQsQMQgwEQQzoLCC4QgwEQsQMQgAQ6CAguELEDEIMBOgsIABCABBCxAxCDAToWCAAQQxBGEPkBEEYQ9AMQ9QMQ9gMYAzoRCC4QgAQQsQMQgwEQxwEQ0QM6DgguEK8BEMcBELEDEIAEOggIABCxAxCDAToLCC4QgAQQsQMQ1AI6DQguELEDEIMBENQCEEM6CwguEIAEELEDEIMBOggIABCABBCxAzoHCAAQsQMQQzoKCC4QsQMQgwEQQzoKCC4QxwEQ0QMQQzoNCC4QgwEQ1AIQsQMQQzoOCC4QgwEQ1AIQsQMQgAQ6BQgAEIAEOgYIABAWEB46CQgAEBYQHhDxBDoKCAAQFhAeEA8QCjoICAAQFhAeEA86BQgAEIYDOgUIIRCgAToICCEQFhAeEB06BAghEBU6BwghEKABEApKBAhBGABKBAhGGAFQAFjJXmDiYGgBcAF4AYAB-QKIAbEskgEINS4zNi4xLjGYAQCgAQGwARTAAQHaAQQIARgH2gEGCAIQARgK2gEGCAMQARgT&sclient=gws-wiz-serp#fpstate=ive&vld=cid:03f71adc,vid:E6BSYodzyUI

@Sandhya_Gajare

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

"B" +(Index+1).Tostring

cheers

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.

“C”+i.ToString

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?

Regards,
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.