No Whitespace but String+space in excel

Hi all,

i want to control the space in excel.
NOT : I’m erasing TL
my excel file

After erasing TL the program data like that

there is a space in red colored area(0 "). I need to control this because i’m summing the all integer datas and for this space i cannot sum that. I’m getting this error =>
"Assign: Conversion from string “75.000.000 " to type ‘Integer’ is not valid.”

my screen is like that :

EraseTL => String , SumPrices => Int


Use stringname.trim

1 Like

where should i write it ?

where are you writing that value there value.trim

1 Like

Hi @yigit.aybey ,

The Value 75.000.000 is not a Valid Integer as well. What does the value indicate ?

Assign: Conversion from string “75.000.000” to type ‘Integer’ is not valid. i erased the empty space but i got the error. should i converting to double or should i use comma instead of dot ?

Hey @yigit.aybey.

In the assign activity where you are removing the TL from the end there you can add Trim method to remove those spaces.
EraseTL = CurrentRow.Item(1).ToString.Replace(“TL”, String.Empty).Trim


1 Like

much better thanks.

i did like that => CDbl(EraseTL.Replace(EraseTL, “”).Replace(",", “”)) but i got the error => Conversion from string “” to type ‘Double’ is not valid.

NOT : I changed to double for SumPrice type.

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