Update the sheet with weekend condition

Hello! I want to update this sheet on daily basis, the bot will run at 6pm daily and will fill the highlighted columns by user inputs. But the problem is on weekend.
How to give the condition to BOT to fill the weekend columns in the sheet as in PRESET/ABSENT column there should be weekend and that row should be in grey color. As this BOT needs to be publish on orchestrator and run daily at 6pm.

Please help me to provide a condition to update the weekend rows in a sheet.

Needs to fill this columns.

Update the weekend days like this.

Hi @sarvesh.b ,

I am not sure if I have entirely got the query. However, To Identify Weekend values, you already have a Day Column which will help you decide if the Day is a Weekend or not.

Do you not want to use that Column ?


Hi @sarvesh.b,

You can simply use the today’s day condition if it is Saturday or Sunday then right down the weekend.

DateTime.Now.DayOfWeek.ToString use this if you dont want to use the column as mentioned by @supermanPunch

For setting the color use below activity:


Yes, but how can read that column its getting me a error as column"Day" does not belong to datatable.

Hi @sarvesh.b,

Are you reading your file from A4 row right?

Please make sure you check the add headers option in the properties panel.

1 Like

@sarvesh.b , You would Require to Keep the Range as “A4” in Read Range Activity with Add Headers enabled

Yes, it taking the other columns but it is not reading the day column.

Okay it should work, I think you are doing the right things.

Can you please try row(0).tostring.trim


@sarvesh.b Could you try to Put a Breakpoint after Read Range Activity, so that you can Check the Column Names in Immediate Panel like below :

1 Like

Make sure don’t have any spaces in the excel sheet header.

Please check the Day header in excel and remove the spaces if there are any. @sarvesh.b

Yess bro, It is giving the other column values perfectly. But for days column it is giving me above error.

Can you please check if there are any spaces? @sarvesh.b

Also please check the columns as recommended by Arpan @supermanPunch.

Yess , it is showing all the columns.

I can see the space after the Days

Please remove from the excel sheet then you will be able to read the column values.

Cheers @sarvesh.b

It works bro, there was a space in days column.

Thankyou for your help friend!

Thankyou Friend for giving this idea.
It works fine now. Cheers

1 Like

You are welcome! @sarvesh.b

Please mark appropriate post as a solution so it will be helpful for other forum members.

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