Need to add new column "Date"

I need to add column called Date. The following column are from “Extracted Data Table”. The rows are not fix. It should write to number of rows. How should I do it. I need to add Date at First column

Thanks

Hi @BHUSHAN_NAGAONKAR1

=> Read Range Workbook
Output-> dt

=>Try this code in Invoke Code:
dt.Columns.Add("Date").SetOrdinal(0)

Invoked Arguments:

=> Write Range Workbook dt

Hope it helps!!

you can use here Build data table activity, there you can mention all of your columns what exact you want and the output of build datatable use in write range

@BHUSHAN_NAGAONKAR1

Use add data column activity and give the name you need and in default value use the date you want to give…It will automatically be added to all rows with data

If you need to change the position to start you can then use set ordinal check this

Cheers

Im unable to view those images. Is it possible for you to share a flow.

Thanks

How will it loop according to extracted data table. The rows are not constant. I did right the code. I want to add date. I just need to write to datatable

Thanks

@BHUSHAN_NAGAONKAR1

Use invoke method and inside that give values as below

  • TagretType: Null

  • TargetObject – readRangeOutput.Columns(“EmployeePayCheck(in $)”)

  • MethodName – SetOrdinal

  • Expand the Parameter property and set the ‘In’ parameter to 0 (See below)

Cheers

Hi @BHUSHAN_NAGAONKAR1

You can just pass the extracted datatable variable in place of dt.

Regards

@Anil_G @Parvathy


Is this correct??
Data of the states is the extracted data

Hi @BHUSHAN_NAGAONKAR1

Click on Invoke Arguments and map it like below way.

Regards

@BHUSHAN_NAGAONKAR1

Invoke method is what you need to use and not invoke code

So I need to append so it will directly Todays date right? I dont need to assign anything right?

@BHUSHAN_NAGAONKAR1

Yes by adding new row with default value it would add data to all the existing rows

And then invoke method if you need to change the column position

Cheers



Pleaee validate the flow. Get an error it has no rowd or columns

@BHUSHAN_NAGAONKAR1

You are adding new column but youa re using append and exclude header…I guess that is the issue

cheers

I don’t need headers again so thats why I clicked exclude header.
It should append on daily update.

@Anil_G please share how should I write Thankyou.

@BHUSHAN_NAGAONKAR1

I am little confused here…as per screenshot I donot see a date in the header which we are adding now if you do not write headers how would you manage the date?

cheers

I got the answer thankyou for your prompt response. It helped a lot. Thankyou for your time and help @Parvathy @Anil_G @yedukondaluaregala

1 Like

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