How to add (string variable) data to excel column 5?

Hi All,

This is simple, but help out in this!

Hi @Shiva_Raj,
Use Add Data Column Activity

1 Like

Sequence1.xaml (39.3 KB)

Im trying to do like this…it is not working…!

Extracting names from website and paste in excel col 5

Refer the below link

@aksh1yadav Please help me out in this!!!

Hi @Shiva_Raj
You can do this using array, store the string variables in array then use the for loop after that use the write cell in for loop to enter that data in column 5. in the range property use counter and increment the counter by in the last. this should work for you.
Thanks & Regards

For Each is showing error…

19.1.0+Branch.master.Sha.3db2bfe8751ed76c2c21f7ee16f53ff69a3e3b75

Source: For Each

Message: Object reference not set to an instance of an object.

Exception Type: System.NullReferenceException

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.NullReferenceException: Object reference not set to an instance of an object.
at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Hi @Shiva_Raj
Have you provided the data in for each loop which have to iterate. it should be the array of string variables .

yeah i have provided it.

Hi @Shiva_Raj,
Here is my solutionoutput.zip (12.1 KB)
I have made changes to your workflow, as mentioned in the mail im saving those names into a csv.

Hope this helps!

Regards,
naveen

Hi Shiva,
I have made some changes to your workflow. Please check the attached workflow and see if it’s working for you. below are the issues i found in your workflow.

  1. Instead of looping through the array you were looping through the empty data table
  2. You don’t need to put For Each inside your while loop. Rather you can directly drag and drop add row activity just after scraping the Name value. That should add each new values to the table in each iteration.
  3. Write the data table to excel after completion of the while loop
    Sequence1.xaml (24.6 KB)
1 Like

Sequence1.xaml (32.4 KB)

find the attached workflow and compare it and still having any doubts let me know,

Regards…!!
Aksh

1 Like

Thanks @aksh1yadav i will check it out and i will let you know

Hi @aksh1yadav

It’s working fine Thank you!!:slightly_smiling_face:

1 Like

Hi Folks,
There are some values in Column1 in excel range(0-15)
I need to write a condition like if it is between 1-5 as Easy and between 5-10 as Medium and above 10 range has Hard ?
Can you help me out ! @aksh1yadav @Naveen_tg @ClaytonM @nadim.warsi

@Hashim_Shamsudeen @Naveen_tg Thanks!!
It is running fine.

1 Like

You are welcome, Buddy!

Hi Shiva,
Please find the attached workflow I have created for you. This should serve your requirement.
I’m just reading the data from an excel and based on the index I’m applying the condition to determine whether it is easy, medium or Hard.
TestWorkflow.zip (15.5 KB)

Hi @Hashim_Shamsudeen
Can you take below excel sheet as example and column ‘C’ should be checked and enter Easy, medium or hard according to price in column ‘D’
Names.xlsx (19.4 KB)

Hi @Shiva_Raj,
I have created the workflow using your sample sheet. However I could see some places where the amount field left blank and some place the amount is provided as a range($3 45- $12 22). I’m not sure what shall I do in those cases hence I’m not handled such exception. Please do the needful changes to the workflow according to your needs. TestWorkflow.zip (32.1 KB)

1 Like