Power Automate Desktopでテキストを数値に変換する方法

kid IT

テキストを数値に変換」では、数字のデータ型をテキストから数値に変換することができます。
数字以外のテキストに対して行うとエラーになります。

スポンサーリンク

テキストを数値

PowerAutomateDesktop テキストを数値に変換1
テキストを数値に変換は、アクションペインのテキストから追加できます。
PowerAutomateDesktop テキストを数値に変換2
追加するとダイアログが表示されます。

変換するテキスト

PowerAutomateDesktop テキストを数値に変換3
一例として、ファイルからテキストを読み取ると、値が数値であってもデータ型的にはテキストとして取得します。
PowerAutomateDesktop テキストを数値に変換4
変換するテキストでは対象のテキストを直接入力する(=数値形式の変数を作成する)か、{x}から変数を指定することができます。
ここでは読み取ったファイルの値を意味する変数を指定します。
PowerAutomateDesktop テキストを数値に変換5
処理を実行すると、データ形式がテキストから数値に変換された同じ値の新しい変数が取得されていることが確認できます。

生成された変数

PowerAutomateDesktop テキストを数値に変換6
変数名をクリックして変更、{x}から取得した値を別の変数に代入が行えます。
PowerAutomateDesktop テキストを数値に変換7
スイッチをオフにすると変数が生成されなくなります。

エラー発生時

PowerAutomateDesktop テキストを数値に変換8
エラー時の処理を指定できます。
PowerAutomateDesktop テキストを数値に変換9
詳細では、指定されたテキスト値を有効な数値に変換できない場合を指定できます。
Microsoft Power Automate Desktop(PAD)アクション、使い方一覧
Power Automate Desktopの使い方を機能・分類別に参照できるまとめです。

コメント

This website stores cookies on your computer. These cookies are used to provide a more personalized experience and to track your whereabouts around our website in compliance with the European General Data Protection Regulation. If you decide to to opt-out of any future tracking, a cookie will be setup in your browser to remember this choice for one year.

Accept or Deny