このチュートリアルでは、Power Automateを使用して、Excelスプレッドシートからテキストを抽出し、コードを記述せずに自動化されたフローを作成します。アパートの問題を「配管」と「その他」に分類し、入居者の名前と電話番号を抽出してExcelシートに追加します。OneDrive for BusinessにExcelファイルをアップロードし、命名されたエンティティ認識(NER)を使用して情報を処理します。フローには、変数の作成、Excelファイルの読み込み、APIを介した情報更新などのステップが含まれます。
Excel スプレッドシートからテキストを抽出するための Power Automate フロー作成チュートリアル
このチュートリアルでは、コードを記述することなく、Excel スプレッドシートからテキストを抽出するための Power Automate フローを作成する方法を説明します。このフローは、アパートメントコンプレックスに関して報告された問題のスプレッドシートを使用し、それらを「配管」と「その他」の2つのカテゴリに分類します。また、報告したテナントの名前と電話番号も抽出し、最終的にこの情報を Excel シートに追加します。
このチュートリアルでは、以下のことを学びます:
- Power Automate を使用してフローを作成する
- OneDrive for Business から Excel データをアップロードする
- Excel からテキストを抽出し、名前付きエンティティ認識(NER)に送信する
- API からの情報を使用して Excel シートを更新する
必要条件
このフローを使用するには、次のものが必要です:
- OneDrive for Business アカウント
- Azure アカウント(Cognitive Services のセットアップが必要)
Excel ファイルを OneDrive for Business に追加する
まず、GitHub からサンプル Excel ファイルをダウンロードし、OneDrive for Business アカウントに保存します。問題は生のテキスト形式で報告されています。この NER 機能を使用して、名前と電話番号を抽出します。
Power Automate ワークフローの作成
- Power Automate サイト に移動し、ログインします。
- 「作成」を選択し、「定期フロー」を選択します。
フローの初期化
「定期的なクラウド フローの構築」ページで、以下のフィールドを入力してフローを初期化します。
フィールド | 値 |
---|---|
フロー名 | Scheduled Review |
開始 | 現在の日付と時刻を入力 |
繰り返しの頻度 | 1 時間 |
フローに変数を追加
Excel ファイルに追加する情報を表す変数を作成します。「新しいステップ」を選択し、「変数の初期化」を検索します。これを4回行い、4つの変数を作成します。
アクション | 名前 | タイプ | 値 |
---|---|---|---|
変数の初期化 | var_person | 文字列 | Person |
変数の初期化 | var_phone | 文字列 | Phone Number |
変数の初期化 | var_plumbing | 文字列 | plumbing |
変数の初期化 | var_other | 文字列 | other |
Excel ファイルを読む
「新しいステップ」を選択し、「Excel」と入力し、「テーブル内の行を一覧表示」を選択します。このアクションのフィールドに、Excel ファイルを追加します。
エンティティ認識のリクエストを送信
まだ行っていない場合は、Azure ポータルで Language resource を作成します。
Excel コンテンツの抽出
接続が作成された後、「テキスト分析」を検索し、「名前付きエンティティ認識」を選択します。これにより、問題の説明列から情報が抽出されます。
テストと結果の確認
フローを保存し、テストを実行する準備が整いました。画面の右上にある「保存」を選択し、「テスト」を選択します。手動でのテストを選択して、フローを実行します。Excel ファイルが更新されます。
次のステップ
このフローを利用して、業務プロセスを自動化し、データの分類と更新を効率化することができます。他のデータも同様の方法で処理し、業務の生産性をさらに向上させてください。
このチュートリアルが、Power Automate を使用して Excel データを効果的に処理するための一助となることを願っています。
————-
Extract information in Excel using Power Automate – Azure AI services
Source link
The article outlines a tutorial on how to create a Power Automate flow that extracts and processes text data from an Excel spreadsheet without requiring any coding skills. The specific use case focuses on categorizing issues reported about an apartment complex into two categories: "plumbing" and "other," while also extracting tenant names and phone numbers. The steps include:
-
Prerequisites: Ensure the Excel file is uploaded to OneDrive for Business and download a sample Excel file from GitHub.
-
Create the Flow: Log into Power Automate and start a scheduled flow. Set the flow’s schedule to run every hour.
-
Initialize Variables: Create four variables to hold tenant information such as names and phone numbers, as well as issue categories.
-
Read Excel Data: Use the action to list rows present in an Excel table, selecting the appropriate file from OneDrive.
-
Entity Recognition: Set up a connection to Azure’s Language resource for Named Entity Recognition (NER) to extract names and phone numbers from the issue descriptions.
-
Extracting Entities: Implement a series of actions to loop through the output from the NER, specifically looking for entities associated with person names and phone numbers.
-
Categorize Issues: Check if the issue description contains the word "plumbing" and update the respective column in the Excel sheet to reflect either "plumbing" or "other."
- Testing the Workflow: Save and manually test the flow to ensure that the Excel file updates correctly in OneDrive.
As a final note, the tutorial emphasizes hands-on experience with Power Automate and encourages users to follow the steps to become familiar with automated data processing tasks.
コメント