Read specific cell in one excel sheet and write to another sheet

Hi all
I have an excel sheet Input.xls, in this sheet I want one column (In Duration(In hrs)) based on the Employee Name and I want to write this column in the below output excel file OutputFile.xls )without any overwriting.
Daily I want to read the input sheet and write it to the new column.
I hope you understand this.
Please help me to solve this

Hi Sharmila,

You could do it like this
Use readrange on the input.xls to get all data from that sheet (store in inputDT)
use readrange on the outputFile.xls to get all data from that sheet (store in outputDT)
now you can start your loop (if you have multiple input rows) or writeRange (or cell) (if you only have one row/cell to output)

in this write do the following
use outputDT.rows.count as starting point for your write to make sure you don’t overwrite any data

If I have understood the problem incoreclty please provide example data/sceenshots or a workflow

Hi @tbrinkman
Thanks for ur reply
Actually, I’m looking for anchor base activity in an excel sheet.
there are different employees and their Intime. Based on their name I need to write the data to output excel sheet (just “In Duration (In Hrs)” )every day.but the employee name should be fixed and the timing should be update daily.

You could do it by using a bouble loop, but I hope there is a smarter way I am not thinking of right now

you still have to store the input and output in the datatabel
then use forEachRow activity to loop trough inputDT
assing rowCount = 0
assign nameFound = false
in this loop use forEachRow actifity to loop trough outputDT
use if activity: rowIn(“name”) = rowOut(“name”)
writeCell(“hourscolumn”+rowCount.ToString) = time
assign nameFound = true

assing rowCount = rowCount+1
EndLoop outputDT
if nameFound = false then
'new name so need new row
write range activity: {name, time}
end if
end inputDT loop

you could also write all the data to the DT firts and afther all the loops end write range back to excel