Replace the value in Excel

Attached the Sample Excel file
jc.xlsx (20.4 KB)

Requirement:

1.Replace the value next to “CC#” cell in excel with “*********”
2. Save the Excel file in same format

Example

We need to find & replace the Value (12345667890) which is available next CC# cell

Hi @Sathish_Kumar_S

Follow the below steps for your better understanding,
→ Use the Excel Process scope activity inside of it insert the Use excel file activity.
→ Give the path of the excel file in Use excel file activity.
→ Inside Use excel file activity, insert the Find/Replace Value activity. Select the Find value from dropdown.
→ In Value to find field give the “CC#:” and create a variable called FoundCell in the Found at field.
→ After that insert the Assign activity and give the below expression,

- Assign -> NextCell = System.Text.RegularExpressions.Regex.Replace(FoundCell, "(?<column>\D+)(?<row>\d+)", Function(m) ChrW(Convert.ToInt32(m.Groups("column").Value(0)) + 1) & m.Groups("row").Value)

→ After assign activity, insert the Read Cell value activity to read the value beside the cell value of “CC#:” and store the output of Read cell activity called OutputValue.
→ After Read Cell activity insert the If activity to check the condition, give the below condition,

OutputValue.Equals("12345667890")

→ Inside then block insert the write cell activity, to write the ****** in the found cell.

Check the below workflow for better understanding,
Sequence1.xaml (14.4 KB)

Required Output -

Regards

You can use attached .xaml I have used linq for achieving the expected output just pass default value(Small Case) in the variable panel variable name “str_Name”

In your case: "cc #: "

Replace the value in Excel Sequence.xaml (13.7 KB)

If you have any queries then let me know.

Regards,
Ajay Mishra