molf
March 7, 2022, 9:39am
1
I need to add an apostrophe to some cells that has an equal sign(=) in order for powerbi not get an error when running and reading the excel file.
When I find these cells that needs to be formatted for example:
in the output excel file, it looks like this:
however, if I do it manually or my expected output is like this:
It seems like when I find cells with = sign and replace them with '= , it formats the original formula to a value of some sort.
Can someone help on how to retain the cell text formula with an apostrophe at the start without uipath automatically turning it into a value.
Thank you
Hi @molf ,
Could you try this?
(From row In dt1.AsEnumerable()
Let ls = row.ItemArray.ToList()
Let ra = ls.ConvertAll(Function(a) If(a.ToString.StartsWith("="),"'"+a.ToString,a.ToString)).ToArray()
Select dt_result.Rows.Add(ra)).CopyToDataTable()
Kind Regards
Ashwin A.K
1 Like
molf
March 7, 2022, 9:55am
4
I will give this a try also thank you!
molf
March 7, 2022, 10:05am
5
Hello I got a little confused with the code. how do I exactly try this and what activities to use? thank you
molf
March 7, 2022, 11:43am
6
It seems that from the read range activity, Uipath already treats the cell with the #NULL ! value as a number and translates it to -2146826288.
is there a way around this?