How to use string expressions with Write Range Workbook

First of all, I apologize for my bad English.

I filtered the string outputs with replace command and I want to print it to excel file with write range workbook activity but I get the error in the picture, how can I fix it?

thank you in advance.

Hi @emir_ozsimsir

Try like this

CurrentRow("Column")=CurrentRow("Column").ToString.Replace("TL","")

@emir_ozsimsir

In your case after Extract Table Data activity take For Each Row in Data Table activity in this take Assign activity as

CurrentRow("Column")=CurrentRow("Column").ToString.Replace("TL","")

After that take Write Range Workbook activity

Note: After Extract Table Data activity no need to take Write Range Workbook activity, Read Range Workbook Activity and Output Data Table activity.

I hope you understand!!

@emir_ozsimsir

Have you tried this?

I apologize for my late reply I use translate to understand. I tried the same thing as you but I get the error in the picture.

@emir_ozsimsir

Show me the total expression in assign activity

Is this the expression you want?

12

No, assign activity expression

1 Like

Show the expression what you have give in the save to and value field in assign activity.

I think you have missed with some double quotes or you haven’t given .toString to make it string @emir_ozsimsir.

Check the double quotes and concatenation +.

Hope it helps!!

1 Like

Both left and right side expressions of assign activity

1 Like

as you are using C# the syntax is: CurrentRow[“Fyat…”]…

1 Like

If you are using C# then please try this

CurrentRow[“Fiyat”] = CurrentRow[“Fiyat”].ToString().Replace(“TL”, “”)

1 Like

Okay @emir_ozsimsir

Just delete the assign activity and reinitialize the assign activity and values.

I think you are using c# in this project.
Then try to replace the curve braces with square braces.
CurrentRow[“Fyat”] in left side of assign

CurrentRow[“Fyat”].ToString.Replace(“TL”, “”) in right side of assign.

1 Like

@emir_ozsimsir

As per the error 1st line once check the data table variable. Read range workbook activity output variable you have to give in for each row in data table activity.

1 Like

thanks to everyone for help, problem solved.

1 Like

Thank you @emir_ozsimsir

Happy Automation!!

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