How to add new column everyday with current date's day

Hi @Vrushali_Gave

In addition to the way @Pablito said u can try this way too

You can try something like this

Read range to read the excel and store in datatable dt1

Use assign activitiy to assign as below

day_1= Now.ToString(“dd”)

Use invoke code with code type as c# with passing dt1 as in/out argument and day_1 as input argument with below code

dt1.Columns.Add(day_1)

Next use write range to write the updated dt1

Hope it helps you

Regards

Nived N :robot:

Happy Automation :relaxed::relaxed:

2 Likes

@Pablito @NIVED_NAMBIAR Thank you for your response

Workflow: follows some steps

  1. Here I’m reading a sheet from excel.
  2. Comparing two columns from the sheet
  3. If the data match, the bot will select that row cell and today’s date column
  4. Bot will write right tick on that cell
  5. Similarly these steps will perform for 100+ row data

Note: the entire process will execute only once a day

The next day the matching row cell will be the same but the column will be current dates day

Therefore I want to add today’s date column every day and the column will add from “F” name of the column in the excel

@Pablito @NIVED_NAMBIAR I have tried both solutions but not worked for me

Hope you guys got the query

Thanks in advanced

@NIVED_NAMBIAR @Pablito Any solution???

What error u are getting while executing in my answer which I suggested above ?

@NIVED_NAMBIAR Instead of adding a column, it’s adding all previous columns

Can u share the screenshot of Workflow @Vrushali_Gave

@NIVED_NAMBIAR Yes Sure, Here is it

image

Can u show how the output sheet is ?

@NIVED_NAMBIAR These are all my previous columns
image

@NIVED_NAMBIAR Could you please help me to find the solution for the above query?

Put the direction of DT as In/Out

@NIVED_NAMBIAR Again same output

Hi @Vrushali_Gave

I had done the following

Input excel file

image

Output excel data

It add the new column with column name as current date

Workflow

Main.xaml (7.0 KB)

Hope it helps you

Mark it as solution if it resolves ur query

Regards
Nived N
Happy Automation

1 Like

@NIVED_NAMBIAR Yeah it worked. Thank you so much

1 Like

@NIVED_NAMBIAR It’s replacing today’s date with yesterday’s date. But I want to add today’s date next to yesterday’s date column

How can we do this?

Hi @Vrushali_Gave

I got the it correctly by executing same workflow which i had sent you

Regards
Nived N
Happy Automation

@NIVED_NAMBIAR I don’t get this kind of O/p

Can u show the workflow u had use

@NIVED_NAMBIAR Yes sure, Here is it

image

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