How to identify the incorrect spellings or grammatical mistakes in word in Uipath

I want to identify the incorrect spellings and grammatical mistakes in word document.How can i identify those mistakes in UiPath

1 Like

TypoWord.xaml (7.2 KB)

3 Likes

Instead of typing on the console, Can we have the output written on a .txt file? Also this operation should happen for multiple documents and generate individual text(.txt) files.
Thanks in advance.
VJ

Using existing Uipath activity, pass a “StringBuilder” as “in/out” argument from main file to Invoke code, append your iterations output to it. Use Write Text activity to write the output to Text file.

This can be done within Invoke code as well, but need to add extra lines of code.

1 Like

Thanks for the quick response vaidya.

My number of input files vary and i want so many number of output files to be generated.

If its not much of an ask, Can you share workflow for the same.

Thanks in advance.:slight_smile:
VJ

Can’t do till tomorrow. Until then try out on your own by searching the forum ideas or see if any one can assist.

  • Use for each to iterate your files.
  • Use invoke code inside foreach and pass the filename.
  • Pass string builder as Out argument (say sb), whereever you have Write line in the Invoke code replace with Append eg: sb.Append(spellingmistakes)
  • Inside foreach, after Invoke code, add Write Text file activity and pass sb.ToString along with textfile filename.
1 Like

Thanks Vaidya.

If i am passing string builder as an out argument in the invoke code activity, I will not be able to access it out side that activity. and if i use it in the main workflow, it will throw and error in the invoke code activity due to protection level.

Looking forward for your assistance.

Thanks,
VJ

Hey vinay,

I got this one sorted. Thank you so much for the assistance.

Cheers
VJ

1 Like

Hi @vikashkumarvivek00 can you plz share the code for above issue?
{how we can extract wrong grammar and wrong spell from paragraph in word document in ui path }

-Hii @vvaidya can u plz help me for extracting spell mistake , grammatical mistake and position of that word from word doc. and also create text file to write this error( Spell mistake, grammatical mistake and position of the word.).
-There are many doc. so bot should create diif. text file for diff doc.
Thank You in advance.