Reverse different Language Words in an Excel Column

I’m Trying To Reverse Specific Words of some Records as Shown Below

in this Excel There is some Words I want to Reverse Them Then write The Reversed Results in a new Column in the Same Sheet
I want to Know how can i Reverse The Arabic Words
in General i want To Reverse the Words and Keep them In the Same Order
Thanks in Advance

Could you clarify the example?

Are you looking for something like this?

StrReverse("abcde") -->  "edcba"

give a try on detecting arabic chars by regex:


then we do reverse the matches

The Arabic Words Should Be Reversed As You Mentioned And Without Changing The word Place in The Sentence
in Example : MR . زتعم ةرتاعزلا ------> MR. معتز الزعاترة

Can you Upload an Example Xaml on how To Detect The Arabic Chars ?

have a look here:



myMatches.Cast(Of Match).Select(Function (x) new String(x.ToString.Reverse.toArray)).toArray

For regex help:

As a second apporach:


Find starter Help here:
RegExReplace_ReverseArabianText.xaml (4.7 KB)

1 Like

Thanks @ppr
its working well but i want to get all the column values and do it for all values not only one string
in example :
mr دمحا زتعم Other Text ------------> mr احمد معتز Other Text
mr دمحا زتعم Other Text ------------> mr احمد معتز Other Text
mr دمحا زتعم Other Text ------------> mr احمد معتز Other Text
mr دمحا زتعم Other Text ------------> mr احمد معتز Other Text
kindly Have a look at my Workflow for better understanding
Reverse (45.4 KB)

im getting values from a column i want to reverse each one of them

lets try to sort it out.
Column has a string
String has 0,1 or more Arabic words
each Arabis word should be reversed, reversed on Word level
Regex.Replace(YourColString, strPattern, Function (x) new String(x.ToString.Reverse.ToArray()))
Pattern: “[\u0600-\u06FF]+”

is doing this in one go.

So, your request is unclear. Please elaborate samples if the issue is still open. Thanks

1 Like

The column has Five rows
i want to reverse each row of the Column
the Regex pattern is perfect with just one String Value
but i need Help in getting all the column Values And reverse the Arabic Words
Kindly Check the Zipped File to See the Excel File and The WorkFlow
Words Example.xlsx (9.3 KB)
Have a look at this excel Sheet
i want to Print the Result of each Row in a new Column Named “Results” in the same Sheet
The question is how can I do It and Thanks for your Help

Sorry, but here we do have to be clear that do get a common base

A DataTable has Rows, Rows having Columns and not vica verse
We cleared above that regex.replace is reversing it for all column values

looking to your code
the access of the column values is not right.
it was done by CurrentRow.toString but has to be CurrentRow(YourColNameOrIndex).toString

  • readin Excel

  • Add DataColumn Result

  • For each row in DataTable

    • Assign: CurrentRow(“Result”) =
      Regex.Replace(CurrentRow(ColNameOrIndex), strPattern, Function (x) new String(x.ToString.Reverse.ToArray()))
  • write datatable to worksheet

Great Job
But it’s Printing The Reversed Words in the Same Column not in the “Results” Column
i just need to know how to add data row to the “Results” Column

i want it To Start printing from the firs cell under the header
The Problem : Add Data Row Activity

share your xaml please, thanks

There You Go
Reverse String (45.5 KB)

find starter help here:
NewActivity_V2.xaml (10.4 KB)

1 Like

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