I would like to seek some help on how to detect the last column and add new column after column F as shown in the image together with the format. I would like this feature to be dynamic so whenever I run the project in studioX it will add a new column at the end.
Hello @Gokul001, I just realise that you’re usingUiPath Studio and I am seeking solution forUiPath StudioX. Hence, I can’t find the settings that you asked me to disable. Thank you.
For a recursive usage you will have to automatically generate the column name . Based on the assumption that the column name progression looks something like this : june-22 , july-22 , aug-22 and so forth and based on the assumption that you will run the StudioX project every month then you will have to do something like this :
Improving on the solution and adding some more programming one can use something like “Excel.Table(”<<name_of_target_table>>“).Columns.LastOrDefault().ToString” to obtain the last column in a specific table . Next one will have to calculate the next month using the modify date activity and the DateTime.Parse function to generate the start date from the column name ( DateTime.Parse(Excel.Table(“<<name_of_target_table>>”).Columns.LastOrDefault().ToString) )
Here’s the same project with the new modifications. Now you can run it again and again and it will insert columns NewBlankTask206_modified.zip (216.1 KB)
Hello @dragos.suma, thank you so much for the solution that you provided it was a great help to me.
But I don’t know where I did wrong. I tried to do the same way as you but it’s not working on my side. Could you please give it a look and see what or where when wrong ? Your help is much appreciated thanks a lot.
Sorry for the late reply i was on vacation. So from what I can see you are trying to use a function into the text builder, and that’s why it’s failing You would have to use the advanced editor
It’s ok and I hope you had a great vacation
I tried using advance editor before but I keep getting compiler error as shown in the image which said the variable is not declared and may be inaccessible due to its protection level. Hence, I change it to text builder as it could access the variable. One more thing I realise is that under the advance editor on my StudioX top left corner shows ‘Value (Excel Value)’ but yours shows ‘Value(String)’ - I underlined it on the image. Why is there a different and how could I change it ?
Ya sure sure, I have attached the project below. Please help me to have a look at it.
Also I would like to ask do I have to always install CheckStudioRuns, BenefitsLibrary and RequiredActivities packages whenever I start a new project ? And what are these packages for ?