Trying to get the sum of the column containing Currency values but always showing format not correct error!

Hello

I am trying to get the sum of a column which has currency values. Tried to replace the value and add it but unable to do so.
Currency is ZAR.
Some cell have null values also in the column.

I am trying to add column “T” under column name BaseOutstanding

I have attached the excel also. Please check.

TIBS_Daily Transaction Data_02 August.xlsx (18.1 KB)

the reason is
we have - and spaces between the values we want to add
and while we try to convert that from string to int or string to double we will be facing the error like input string is not in right format
–so replace that space between number without space and
–for that - symbol validate using a if condition like this
row(19).ToString.Contains(“-”)
if true will go for THEN part where we can remove that - symbol with replace activity and we can hardcode a negative symbol with a assign activity

Hope this would help you
Cheers @AryanSingh

@Palaniyappan

I have already tried this method on my end but it did not return any value.

@Palaniyappan

please try once on your end and if there are any modifications, please tell me and share the workflow with me.

1 Like

Let’s see if I understood

¿You want to get the sum of both cells? As

image

And get the total sum of that column?

image

@inf_L
not both cells buddy.

I want to get the sum of column “BaseOutstanding” only. The column which u have circled!

@inf_L

Please guide me for this!

@AryanSingh

Can you try this if it helps for you…
Here, getSumOfCreditDataTable is output of readRange
Credit is Column name

image

Please check if it helps you.

Or can’t you remove rows which which are blank - as a work round i am suggesting.

Regards,
Ahtesham

Im developing ur solution, in a few of minutes i upload it

@md.ahtesham

ok let me try

@inf_L

ok thanx

Hi @AryanSingh

Check this
int MaxValue=Convert.ToInt32(dt.AsEnumerable().Max(Function(row) row("InvoiceNumber ")))

Thanks
Ashwin S

@AshwinS2

I dont understand why is the invoice number column needed for the addition of the column BaseOutstanding?

Hi @AryanSingh

Ok do pass the BaseOutstanding Columns and check it

Thanks
Ashwin S

ok

@AshwinS2

Main.xaml (10.6 KB)

Here its! U only will need add interop.excel package to uipath libraries

image

Bless

And pls change this values in Invoke Code:

image

.Open(path)
.Sheets("urSheetName")
.Format("=SUM..") < - By the lenguage, i have my system in spanish.

Blees

@inf_L

i am running the workflow but i am not sure where the result is!

¿The file destination?, that u set inside “Append Range”

@inf_L

but i did not get the result there. its just showing the original sheet!

I download it again and its working, can u show me how u configurate this?

image