Hi,
I have read the data in each cell from a particular column in excel and searched in the web and retrieved the required information using get text and now i want them to be fed in to the same excel in a different column. How do i do it??
Hi,
I have read the data in each cell from a particular column in excel and searched in the web and retrieved the required information using get text and now i want them to be fed in to the same excel in a different column. How do i do it??
Using Datatables this can be done
Steps
Use Read Range Activity to read your column as a datatable
Next use a For Each loop
Use the assign Activity to give value of the row (cell) value of new column a specific value (web data you extracted)
Assuming Column 0 (Column A) is the first column you read and Column 1 (Column B) is the second column you want to input the web data into :
Assign
row.item(1) = Web_Data
I have the read the data from the excel and also retrieved the data from web page using get text and stored it in a variable. Now i have to feed the 10 different data stored in that variable to 10 cells in a column. The issue is the value gets written in the same cell. Guide me to solve this issue.
@dhamods use counter variable and in write cell pass the counter variable Refer this
In for each Row activity,
Assign index = DataTableName.rows.indexOf(row) + 2
Then use write cell activity to write into corresponding cell. If you want to write into âCâ Column then pass range as âCâ+index.Tostring and pass output of getText activity.
@lakshman thanks buddy.
If i want it to be started from C2 cell what i have to do
It will start from âC2â cell only. Thatâs y I added +2 there.
Actually, index will start from zero onwards and we donât want to write in headers right. So, I added +2.
Donât pass it in Index property under output.
Inside For each Row activity, Take one assign activity and pass this: DataTableName.rows.indexOf(row) + 2 and store it in a variable say âIndexâ of type integer.
Thanks @lakshman
Is it working or not ?
If you have any doubts then pls let me know.
If the above one works for you then close this thread by marking it as solution.
In Assign activity,
Left side: declare one variable of type Integer and say âIndexâ
Right side:  DataTableName.rows.indexOf(row) + 2
Note: This assign activity should be inside For Each Row activity.
@lakshman I did it. But it writes the same value in all the given range of cells. Not distinct values. The final search value is written in the excel in all cells.
This is the issue I was facing all time.
| S.no | City Name | Weather | 
|---|---|---|
| 1 | Chennai | 3188°C°C | 
| 2 | Hyderabad | 3188°C°C | 
| 3 | Delhi | 3188°C°C | 
| 4 | Mumbai | 3188°C°C | 
| 5 | Kolkatta | 3188°C°C | 
| 6 | Rajasthan | 3188°C°C | 
| 7 | Bangalore | 3188°C°C | 
| 8 | Punjab | 3188°C°C | 
| 9 | Pune | 3188°C°C | 
| 10 | Gujarat | 3188°C°C | 
Before writing into excel cell, print the output of GetText activity(Scrapped data) and check whether it is scrapping correctly or not.
If possible share workflow with me and will check it.
It doesnât allow me to attached the file.
Are you tried to print scrapped values and is it changing every time ?
@lakshman
Yes I Printed it with message box and it changes all the time.The problem is it is even printing different values in the excel but each and every value is printed in all the cell and it changes one after another and the final value is the one which stays in all the cell.
@dhamods Is it possible to share your workflow