Save to cell current date and time

HI,

I have a stream that saves web documents and needed to generate an excel report stating the time and date each file was downloaded.

image

He reads Plan1

image

And place the date on Plan

I need to adapt the code to fulfill a request and already tried and I’m not getting. Today he put the date on all lines of excel, but I need him to put the date only on the line corresponding to the file that was downloaded, follow stream, will download the next file and note on the other line the date and time that file has been downloaded, one at a time

I managed to write in one line, but in this logic always writes in the same line, any hints of how I could write each in a line, for each row writes all the same and I need to write in 9 then 8 and so on

image

@KMota,

from the above code i can understand you are writing the date only once in the excel sheet and at the time you are writing the value the counter variable is 8. So you only see the value in E8.

Try writing the value in the excel for every counter value and see.

Thanks,
Sid

1 Like

@KMota

Keep the Counter = datatable.row.count outside the For each.
currently for Every iteration counter will be 9 so counter - 1 will be always 8.

Try it by moving outside the loop.

Thanks,
Suresh J

1 Like

Thanks, I managed to move it out, it worked perfectly
:slight_smile:

cheers @sureshj

1 Like

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