Add column to existing excel spreadsheet

hello, I am extremely new UiPath, have a small problem. have an excel table. use Add Data Column activity to add column, fill in the properties with the new Name for this column. no errors, but when run, I do not see the column added. when run again, get error this new column is already part of the table, but it is not visible, please help. thank you in advance!

1 Like

@Lana

Welcome to forums

Did you use write Range activity to write back to Excel?

Thanks

hi, so this is what I am doing, I have an excel table with two columns, I need to do calculations and write them into the third column that I need to add to the existing table. these are my steps: read range, for each row get row item, if statement (doing my calculations here), then i want to use write range activity to write the results into the third column. i have log message and i see the calculations are correct, but I just can’t write them into Excel third column - these are my struggles:

  1. do i add third column at this step? i tried, can not see it, even the Header.
  2. i can’t write range because my data is Int32 type m(after the calculations), but write range requires Data type and I am stuck here.

@Lana

You can check below for your reference

Just use Add datacolumn after Read Range, before For Each Row

Hope this helps you

Thanks

ok, I did Add Data Column before for each.
watch your video and tried to apply it to my scenario, this is the error I got -
Assign: Exception has been thrown by the target of an invocation.

not sure what to do now,
i appreciate your help very much!

@Lana

If you share your workflow and sample excel, so that we can check

Thanks

Number1 Number2
2 3
5 6
7 7
2 1
7 2
4 6
8 8
9 3
3 4

@Lana

Check below attached workflow
WriteRangeExcel.zip (516.2 KB)

Mark as solution if this resolves your issue

Thanks

1 Like

WriteRange.zip (518.0 KB)

Thank you! It worked! Still working on details, but seems to be working. I appreciate your help very much! Very grateful!

1 Like

Thank you!

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