メインコンテンツへスキップ

テキストを置換 Excel で Power Automate

PDF4me テキストを置換 Excel アクションにより、包括的な検索と置換操作が可能になります。 Excel ドキュメント Power Automate オプションの書式設定アプリケーション付き。この強力なテキスト操作機能は、文字テキスト置換と正規表現 (regex) をサポートし、大文字小文字を区別するマッチングオプション、セル全体または部分的なマッチング、1 つの操作での複数の置換フレーズ、およびオプションの書式変更 (フォント、色、サイズ、太字、斜体、下線、取り消し線、下付き文字、上付き文字) を備えています。データの標準化、コンテンツの更新、エラーの修正、およびすべてのワークシートにわたる自動テキスト変換に最適です。 Microsoft 365 ワークフロー。

関連ブログ記事
この機能に関するブログ記事はまだありません。近日公開予定です。
その間、PDF4me ブログを閲覧して、あらゆるプラットフォームのチュートリアルやワークフローをご覧ください。
ブログをご覧ください →

認証 API リクエスト​

アクセスするには PDF4me ウェブ API を通して Power Automateすべてのリクエストには適切な認証情報を含める必要があります。認証により安全な通信が保証され、承認されたユーザーとしての身元が検証され、シームレスな統合が可能になります。 Power Automate 流れと PDF4meの強力な Excel テキスト置換サービス。

Excel Power Automateでテキストを置換する

主な機能​

  • リテラルと正規表現のサポート: シンプルなテキストマッチングまたは強力な正規表現を使用してテキストを置換します。
  • 大文字と小文字を区別するオプション: 正確なマッチングまたは柔軟なマッチングのために大文字小文字の区別を制御します
  • 全細胞マッチング部分一致またはセル全体の一致を要求する
  • 複数交換複数の検索置換操作を単一のアクションで処理する
  • オプションの書式設定置換後のテキストにフォント、色、サイズ、スタイルの変更を適用する
  • すべてのワークシートの処理ワークブック内のすべてのワークシートを自動的に処理します

パラメータ​

「テキスト置換」のパラメータ一覧 Excel アクション。これらのパラメータを設定して、テキスト置換を制御します。

パラメータ必須その機能例
File ContentOptionalContent of the Excel file to process. Map it from the file content returned by a previous action, such as SharePoint or OneDrive Get file content.@{body('Get_file_content')?['$content']}
File NameOptionalName of the Excel file, including its extension (for example `report.xlsx`). Map it from the file name returned by a previous action. Defaults to `ReplaceText.xlsx`.report.xlsx
Replace OperationsOptionalThe replacements to make. Add one item per search text; each item can set its own matching options and formatting.your value
Search TextRequiredText to search for.your value
Replacement TextRequiredReplacement text.your value
Use Regular ExpressionConditionalIf Yes, Search Text is treated as a regular expression. Defaults to `No`. Shown when Replace Operations is set.No
Match Entire CellConditionalMatch entire cell content only. Defaults to `No`. Shown when Replace Operations is set.No
Case SensitiveConditionalPerform case-sensitive search. Defaults to `No`. Shown when Replace Operations is set.No
Font NameConditionalFont name for replacement text. Shown when Replace Operations is set.your value
Font ColorConditionalFont color (hex code or color name). Shown when Replace Operations is set.your value
Font SizeConditionalFont size for replacement text. Shown when Replace Operations is set.0
BoldConditionalWhether the replacement text is bold: Apply, Remove, or Inherit. Options: Apply, Remove, Inherit. Defaults to `Inherit`. Shown when Replace Operations is set.Inherit
ItalicConditionalWhether the replacement text is italic: Apply, Remove, or Inherit. Options: Apply, Remove, Inherit. Defaults to `Inherit`. Shown when Replace Operations is set.Inherit
StrikethroughTypeConditionalStrikethrough to apply to the replacement text. Options: Single, Double, None, Inherit. Defaults to `Single`. Shown when Replace Operations is set.Single
UnderlineTypeConditionalUnderline to apply to the replacement text. Options: Single, Double, Dash, Dotted, None, Inherit. Defaults to `Single`. Shown when Replace Operations is set.Single
ScriptTypeConditionalSubscript or superscript to apply to the replacement text. Options: Subscript, Superscript, None, Inherit. Defaults to `Subscript`. Shown when Replace Operations is set.Subscript
Font Scheme TypeConditionalSet the Font Scheme type to apply to the text. Options: Major, Minor, None, Inherit. Defaults to `Inherit`. Shown when Replace Operations is set.Inherit
Theme ColourConditionalSet the colour for the 'Replacement Text' according to the theme within the Excel file. Options: Accent1, Accent2, Accent3, Accent4, Accent5, Accent6, Dark1, Dark2, Light1, Light2, None, Inherit. Defaults to `Inherit`. Shown when Replace Operations is set.Inherit
Culture NameOptionalCulture name for text processing.your value

出力​

の PDF4me テキストを置換 Excel アクションは、シームレスな包括的な出力データを返します Power Automate フロー統合:

テーブルビュー

構造化された表形式の応答データ:

分野タイプ内容物
Processed File ContentFile contentContent of the Excel file with the text replaced. Map it into the next action, for example the File Content field of SharePoint or OneDrive Create file.
SuccessYes/NoWhether the operation completed successfully
Error MessageTextError message if operation failed
Error DetailsArrayList of detailed error messages

よくあるエラーメッセージ​

エラーを理解し、トラブルシューティングすることで、スムーズな進行を確保できます。 Excel テキスト置換ワークフロー:

エラーメッセージ原因解決
「リクエストが空です」リクエストオブジェクトがnullです有効なリクエストオブジェクトを指定してください
「ドキュメントが空です」ドキュメントオブジェクトはnullです有効な Excel 書類
「代替フレーズは提供されていません」フレーズリストがnullまたは空です少なくとも1つの代替フレーズを提供してください
「検索テキストが空のフレーズをスキップします」フレーズにnullまたは空のSearchTextが含まれています(警告としてログに記録されます)すべてのフレーズに対して有効な検索テキストを指定してください。
「無効な正規表現パターン '{pattern}': {error}」IsExpression = true の場合、正規表現が無効です(警告としてログに記録されます)。正規表現の構文を修正するか、特殊文字をエスケープしてください。

注記: 無効なフレーズは警告としてログに記録されますが、処理は停止しません。その他の有効なフレーズは引き続き処理されます。

ワークフローの例​

の PDF4me テキストを置換 Excel アクション Power Automate 実際のビジネスシナリオに合わせて設計された包括的なワークフローテンプレートを提供します。

自動データフォーマット標準化ワークフロー

自動テキスト置換と書式設定でデータ品質を向上させましょう。

ワークフローの手順を完了する:

  1. トリガーデータインポート Excel 「処理中」にアップロードされました SharePoint フォルダ
  2. インポートファイルを取得する: 取得 Excel データが矛盾しているファイル
  3. 電話番号を標準化する正規表現を使用して「(XXX) XXX-XXXX」を「XXX-XXX-XXXX」に置換します。
  4. 日付を標準化する正規表現グループを使用して「MM/DD/YYYY」を「YYYY-MM-DD」形式に変換します。
  5. クリーンタイトル「Mr.」「Mrs.」「Dr.」を「Mr」「Mrs」「Dr」(ピリオドなし)に置き換えてください。
  6. エラーを強調表示: 書式設定を使用して「ERROR」を赤色の太字「ERROR」に置き換えます
  7. 定型句: 4つ以上の置換操作すべてを含む配列を作成します
  8. ファイル処理: すべての置換を単一の操作で適用する
  9. アップロード標準化「標準化データ」フォルダに保存してください。
  10. 概要を送信データ所有者に標準化レポートをメールで送信

ビジネス上のメリット:

  • 毎週200行以上のデータを自動的に標準化します
  • すべてのインポートにおいて一貫したデータ形式を保証します。
  • エラー箇所を赤色で強調表示し、簡単に識別できるようにします。
  • 手動によるデータクリーンアップ時間を85%削減します

業界におけるユースケースとアプリケーション​

財務・会計におけるユースケース

  • 通貨標準化通貨記号と形式を置き換える
  • アカウントコードの更新レポート全体で勘定科目コードを更新する
  • ステータス値修正取引ステータスにおけるよくあるスペルミスを修正します
  • 日付形式変換財務データの日付形式を標準化する

ヘルプが必要な場合​