- 基本情報
- チュートリアル
- オートメーション プロジェクト
- オートメーションの作成
- トラブルシューティング
StudioX user guide
The default Project Notebook available with all automation projects comes with a number of formulas that can be easily incorporated in your automations when selected from the
menu of activity fields. In this tutorial, we will create a simple currency conversion automation that demonstrates how you can add a formula of your own to the Project Notebook and use it in your project.
最初に、プロジェクト ノートブックの Scratchpad シートのセル C1 に、米ドルをユーロに変換する式を手動で追加します。次に、以下のタスクを実行するオートメーションを作成します。
- 米ドルからユーロへの為替レートを Web で検索して調べたら、セル A1 に追加します。
- プロジェクト実行時に米ドルの金額を確認するプロンプトを表示し、その額をセル B1 に追加します。
- 米ドルの金額に相当するユーロの金額をセル C1 で計算し、結果をメッセージ ボックスに表示します。
最後に、今後プロジェクト ノートブックが変更されてもこのオートメーションが引き続き実行されるように、オートメーションで使用しているセルに名前を付けて、それらの名前が付けられたセルを使用できるようにプロジェクトを更新します。
-
プロジェクトを設定し、プロジェクト ノートブックを更新する
- Create a new blank project using the default settings.
- Click Notebook in the StudioX ribbon to open the file in Excel.
- Excel ファイルの Scratchpad シートを選択し、セル C1 に式
=A1*B1を入力します。この式は、セル B1 に追加される米ドルの額を、セル A1 に追加される為替レートを使用してユーロに変換します。 - プロジェクト ノートブックを保存して閉じます。
- This example uses Google Chrome, which requires the UiPath® extension for Chrome to be installed. To install it, go to Home (StudioX Backstage View) > Tools, and then, under UiPath Extensions, click Chrome.
-
Web から為替レートを取得する
-
Open Google Chrome, navigate to google.com, and search for
usd to euro exchange rate. -
In StudioX, click
in the Designer panel, and then find the Use Application/Browser activity in the search box at the top of the screen and select it. The activity is added to the Designer panel. -
In the Use Application/Browser activity, click Indicate application, then move the mouse to the page with the search results for the exchange rate and, when the browser page is highlighted in blue, click anywhere inside it.
ここでは、検索結果のページをオートメーションで使用するように指定しました。
-
Click
inside the Use Application/Browser activity, and then find the Get Text activity in the search box at the top of the screen and select it. The activity is added to the Designer panel. -
[テキストを取得] アクティビティで、次の操作を行います。
-
[画面上でターゲットを指定] をクリックし、Web 検索の結果ページの最上位に表示されるユーロの値にマウス ポインターを移動します。値が強調表示されたらクリックします。値がターゲットとして識別され、緑で強調表示されます。[選択オプション] ウィンドウの [確認] をクリックして選択内容を保存します。ターゲットおよび識別されたアンカーの画像が [テキストを取得] アクティビティに表示されます。
-
Click
on the right side of the Save to field, and then select Notebook > Indicate in Excel. In Excel, select cell A1, and then click Confirm in the UiPath tab in the Excel ribbon. You have indicated that you want to paste the exchange rate in cell A1 in the Scratchpad sheet of the Project Notebook.
-
-
-
米ドルの金額を確認するプロンプトを表示し、それに相当するユーロの額を表示する
-
Click
below the Get Text activity, and then find the Write Cell activity in the search box at the top of the screen and select it. The activity is added to the Designer panel. -
[セルに書き込み] アクティビティで、以下の操作を行います。
-
Click
on the right side of the What to write field, and then select Ask when run. -
Click
on the right side of the Where to write field, and then select Notebook > Indicate in Excel. In Excel, select cell B1, and then click Confirm in the UiPath tab in the Excel ribbon.これで、プロジェクトの実行中にアメリカ ドルでの金額をユーザーに確認し、この値をプロジェクト ノートブックの Scratchpad シートのセル B1 に貼り付けるように指定したことになります。
-
-
Click
below the Write Text activity, and then find the Message Box activity in the search box at the top of the screen and select it. The activity is added to the Designer panel. -
In the Message Box activity, click
on the right side of the Message field, and then select Text. -
「X 米ドルは Y ユーロに相当します。」というメッセージを表示します。そのためには、テキスト ビルダーで以下の手順を実行します。
-
Click
on the right side of the text box, and then select Project Notebook (Notes) > Indicate in Excel. In Excel, select cell C1, and then click Confirm in the UiPath tab in the Excel ribbon.. -
「
USD is the equivalent of」と入力します。 -
Click
on the right side of the text box, and then select Project Notebook (Notes) > Indicate in Excel. In Excel, select cell B1, and then click Confirm in the UiPath tab in the Excel ribbon.. -
「
EUR.」と入力します。テキストは次の画像のようになります。

-
-
テキスト ビルダーで [保存] をクリックし、次に StudioX のリボンで [保存] をクリックしてオートメーションを保存し、[実行] をクリックしてオートメーションを実行します。

為替レートを Web で検索して調べます。ユーザーに金額の入力を求め、その値を Excel で米ドルからユーロに変換し、変換結果を示すメッセージを表示します。
-
-
プロジェクト ノートブックのセルに名前を付けて、オートメーションを最適化する
オートメーションはまったく問題なく機能するようになりましたが、使用されるセルに名前を付け、それらを参照するアクティビティを更新して、さらに改善します。セルへの命名には、次のようなメリットがあります。
-
When configuring activities, you can select named cells directly from the
menu, without having to open the file and indicate in Excel. -
セルを参照ではなく名前で特定すると、Excel ファイルを変更したことでセルの位置がずれた場合に、正しいセルを参照するようアクティビティを更新する必要がなくなります。
セルに名前を付けてプロジェクトを更新するには、次の手順を実行します。
- Excel でプロジェクト ノートブックを開き、数式バーの左端にある名前ボックスを使用して、Scratchpad シートの以下のセルの名前を変更します。セル A1 には
ExchangeRate、セル B1 にはUSDValue、セル C1 にはEURValueという名前を入力します。 - セル名を使用するように、プロジェクト内のアクティビティを更新します。
- In the Get Text activity, click
on the right side of the Save to field, and then select Project Notebook (Notes) > Scratchpad [Sheet] > ExchangeRate. - In the Write Cell activity, click
on the right side of the Where to write field, and then select Project Notebook (Notes) > Scratchpad [Sheet] > USDValue. - In the Message Box activity, click
, then select Text and update the two references to cells in Excel:
-
Delete
[Excel] Scratchpad!B1, then click
on the right side of the text box and select Project Notebook (Notes) > Scratchpad [Sheet] > USDValue. -
Delete
[Excel] Scratchpad!C1, then click
on the right side of the text box and select Project Notebook (Notes) > Scratchpad [Sheet] > EURValue.更新されたプロジェクトは次の画像のようになります。

-
- In the Get Text activity, click
-