Replace text


#1

Hi I want to replace “.mp4” from a column of a excel sheet. But it throws error
Replace Text : Object reference not set to an instance of an object.
Here is my work flow


#2

Hi @Atul_Rai,

The replace Text activity works only the Word Application Scope.

Kindly read this document.

Regards
Balamurugan.S


#3

thanks @balupad14
Is there any way to do it in excel?


#4

Yes @Atul_Rai,

We have many to do the find replace.
1.If the sheet is look like datatable manner. you read all into a datatable. And find and replace in the datatable.
2.If it is non format , you can read the each cell and do the find and replace.

If you share the xl . I can suggest you with example .

Regards
Balamurugan


#5

yes here it is. Book1.xlsx (9.2 KB)


#6

Hi @Atul_Rai,

Check this …

File : FindandReplace.zip (14.8 KB)

Regards
Balamurugan.S


#7

thanks @balupad14 for the help.
I have 2 more requirements
1.I have to remove PIPE( | ) symbol from the sheet if it comes at last
example: Bhakti Kala|
output: Bhakti Kala

2.I have to remove the text after the pipe symbol if it has Live before it.
example:Sringar Aarti Chowpatty ISKCON (Live)|Sringar Aarti Chowpatty ISKCON
output:Sringar Aarti Chowpatty ISKCON (Live)

here is the sample .xl file :Book1.xlsx (9.3 KB)


#8

HI @Atul_Rai,

Check this .

File : FindandReplace2.zip (16.4 KB)

thank you @SaranyaKishore for the like.

I found the duplication in the xl sheet. if you want to remove , you can use the

Regards
Balamurugan.S


#9

thanks @balupad14 your answers are very helpful.
I will try to remove duplicate rows. But my excel has the list of programs to be telecast so if I will use remove duplicate row then it will remove the repeat telecast also. I tried to remove the duplicate using do-while loop but got stuck in the loop.
Thanks again for the help


#10

Hi @balupad14 in your file FindandReplace2 it is removing everything after pipe symbol
but I want to remove pipe if and only if it is at the end and remove the content after pipe if (Live) comes before the pipe symbol.


#11

Hi @Atul_Rai,

Check this !! FindandReplace3.zip (16.8 KB)

Regards
Balamurugan


#12

thanks @balupad14 great work.