Skip to main content

Delete the blanks before and after the string

If you search for actions, you can often do what you want to do with drag and drop, but when you extract data from websites and on-premises software, you may come to data that is not originally necessary.

This time, I will explain how to delete the front and rear blanks from the acquired text data.

implemented with copy and paste

Copy the following code and paste it on the edit screen of Power Automate Desktop to add the target action.

Text.Trim Text: $'''%' ←Full -width blank half -width blank→  '%''' TrimOption: Text.TrimOption.Both TrimmedText=> TrimmedText

Operate and implement Power Automate Desktop

  1. Enter "Text Trimming" from "Action Search" and set the property as follows.

    Parameter namevalue
    Textbooks to trimThe target variables and the character string enclosed by %''%
    Total targetYou can choose both, only the lead, the end
  2. When executed, a string where the blank is removed from the target text is returned.