How to add a column containing a function

I would like to transform the data from its original state into the processed state.

As for the steps, I would like to insert columns to the right of the existing table, enter the column names, and then add formulas starting from the second row to process the data.

UiPath question data.zip (11.0 KB)

I’ve managed to create most of the formulas to enter, but I’m having trouble figuring out how to add these columns in UiPath.

I’m sorry to trouble you, but I would greatly appreciate your guidance.

Regarding the assignee field in column E, could you let me know if there’s a way to replace the email address in column D with the corresponding assignee, rather than adding it to column H? If that seems difficult, I’m considering adding a new column.

@yulax,

Use Excel Process Scope → Use Excel File → Write Cell activity to write column name at first row.

After that user fill range activity to file data from second row.

Hello

For example, this is possible using a Dictionary or something similar. I think it would look like this:

dict = dtMaster.AsEnumerable.ToDictionary(Function(r) r("従業員アドレス").ToString(),Function(r) r("従業員リスト").ToString())

Sample
Sample20250803-1.zip (10.7 KB)
The output is saved to result.xlsx.

I have looked into the changes to the person-in-charge field mentioned above, and I apologize for taking so long to reply.

Since this will also be used for other tasks, I would appreciate it if you could explain how to fill in columns F and G.

I was able to write =C2&A2 to the cells and repeat it through the last column, but there are about 8,000 rows, so the process takes a long time. I am considering creating it using the following steps: read the data table → create a data table for writing → write to the specified range. However, I am stuck because I don’t know how to create it.

I apologize for troubling you while you are busy, but I would appreciate your guidance.

Hello

For example, I think it would look like this

Sample
Sample20250803-1v2.zip (10.9 KB)

Thank you for your reply.
I created it as described above, but some of the data sources I need to read are CSV files, and in those cases, the Read Range activity isn’t applicable.
What would be the best way to handle this so it runs smoothly?

There are several ways to handle this, but I think it would be best to try the Read CSV activity first.

Thank you for your response!
I’ve finished loading the CSV source data, but I’d like to use Read Range to store the employee list and address table in a DataTable, then save them to a dictionary using Assign. However, I can’t proceed because I get the error, “Assign: An item with the same key has already been added.” Is there a good way to handle this?

Also, when I read the CSV, the entire sheet is stored in a DataTable, so I’m concerned about the subsequent steps for changing the person in charge, concatenating the first and last names, and specifying the columns to write to.
I’d like to ask whether it’s possible to specify the columns or cells to read and write.

I think this may be because there are duplicate keys.
Could you check whether there are any duplicate keys, including blank ones, and, if there are, whether their values are the same or different?
If the values are the same, you can resolve this by removing duplicates beforehand. But if they’re different, the value can’t be uniquely determined, so you may need to review the data itself or the business logic.

Also, when reading a CSV, the entire sheet gets stored in a DataTable, so I’m concerned about the subsequent steps: changing the person in charge, combining the surname and given name, and specifying columns when writing the data afterward.
I’d like to ask whether it’s possible to specify which columns or cells to read and write.

I don’t think there should be any particular issues with the process. (In fact, since the CSV format has relatively loose conventions, processing it all at once seems less likely to cause problems.)

I apologize. I wasn’t aware of what the key referred to, so I overlooked checking it.
There was an identical entry in the employee address, so I deleted it.

Writing to the CSV also worked without any problems!
Thank you for checking!

Also, when a specified field (let’s say “Date of Response”) has been filled in, I would like to enter the same value as the person in charge into the “Responder” cell. I believe I should ask how to write the condition in the condition field for the conditional branch.
I’m very sorry to trouble you again.

The contents of the Assign are as follows.
CurrentRow(“応対者”) = CurrentRow(“担当者”).ToString()

Since this is moving away from the title and content of this topic, I think it would be better to create a separate topic.

The condition expression would be something like

not String.IsNullOrEmpty(CurrentRow("応対者").ToString())

Thank you for your response.
I was able to extract the data I was looking for.
From now on, I’ll create a separate topic for each subject when asking questions.

Thank you for taking the time to help me despite your busy schedule.
If I get stuck again, I’d be grateful for your guidance whenever you have time.