"Comma separator in numeric value" transfer from MS excel to MS word document

Dear All,
I want to transfer “comma separator in numeric value” (Example: 2,450,500)from MS excel cell to MS word. Actually i am creating multiple word file from an excel database using “Replace text” activity. but whenever i replace a text like “link price” by a numeric value (Ex: 2,450,500) from an excel cell, this comma separator vanishes, remains only 2450500. How can i incorporate comma separator in MS word while using “Replace text” activity.

@Sojol_Hamid

Try with Format Value activity and use Replace tex activity

Hope this may help you

Thanks

1 Like

Many Thanks for your prompt reply. I shall try & share with you. thanks once again.

Hello, I tried to use “format value activity” but failed. what should i fill in “value” of this activity. I have a database, which column name is “link Price” which have numeric values and I am using “For each row” activity to put different “Link Price” in different word file. Please suggest.

@Sojol_Hamid

Declare a ForEach Row-> Index variable in Index property
Assign a Generic type variable = Dt.Rows(Index).Item(“link Price”).ToString

Check below for your reference

Hope this may help you

Thanks

Hello. Many thanks for taking your time & effort to make it clear. I also declare a variable “LinkPrice” & assign rows(“Link Price”).toString into this. but i got some issue. for your understanding, I am attaching two pictures:


@Srini84 could you please help me to find out the root cause of my error? i have attached two pictures in above comment.

@Srini84 i am getting this kind of Error, though i tried to duplicate your one. i declared “Sample” as string variable.

Hi,

FormatValue activty supports GenericValue type variable.
So can you try to use it?

Or

You can also convert it using the following expression.

LinkPrice = Decimal.Parse(LinkPrice).ToString("N0")

Regards,

1 Like

@Sojol_Hamid

Declare Sample as a Generic type Variable

Hope this may help you

Thanks

1 Like

It works!! Many thanks @Srini84 !! i forgot to declare the variable in “GenericValue”, that’s why i got that type of error. You saved my day!! Many many thanks!!!