UiPath Documentation
studiox
2023.10
false

StudioX user guide

最終更新日時 2026年4月30日

チュートリアル: セルの書式を設定する

In this tutorial, we will create a simple automation that applies one format to the cells in the header row of a spreadsheet and another format to the cells in the first column of the same spreadsheet. We will apply each format to a cell in the project's Project Notebook, and then use two Copy Range activities to copy the format of each cell to the intended row and column in our spreadsheet.

  1. プロジェクトを設定し、必要なファイルを取得します。
    1. Create a new blank project using the default settings.
    2. このチュートリアルでは、このページ下部にあるボタンを使用して、オートメーション プロジェクトを含むアーカイブをダウンロードして展開し、DoubleUI.xlsx ファイルをプロジェクト フォルダーにコピーします。
  2. 希望の書式設定をプロジェクト ノートブックの 2 つのセルに適用する
    1. Click Notebook in the StudioX ribbon. The file Project_Notebook.xlsx is opened.
    2. 第 1 列用の次の書式設定をプロジェクト ノートブックの Scratchpad シートのセル A1 に適用します。
      • 塗りつぶしの色: ライト ブルー
      • 小数点以下 2 桁の数値形式
    3. ヘッダー行用の次の書式設定をプロジェクト ノートブックの Scratchpad シートのセル B1 に適用します。
      • 塗りつぶしの色: ライト グレー
      • フォント スタイル: 太字
    4. プロジェクト ノートブックを保存して閉じます。
  3. DoubleUI.xlsx をプロジェクトに追加し、書式設定を列と行にコピーする
    1. Click Add Activity ドキュメントの画像 in the Designer panel, and then find the Use Excel File activity in the search box at the top of the screen and select it. A Use Excel File activity is added to the Designer panel.

    2. アクティビティで次の操作を行います。

      • Click Browse ドキュメントの画像 next to the Excel file field, and then browse to and select the file DoubleUI.xlsx

      • [参照名] フィールドに「DoubleUI」と入力します。

        これで、このオートメーションでは名前を DoubleUI としたファイル DoubleUI.xlsx を操作対象として指定したことになります。

    3. In the Use Excel File activity, click Add Activity ドキュメントの画像, then find the Copy/Paste Range activity in the search box at the top of the screen and double-click it. The activity is added inside the Use Excel File activity.

    4. [範囲をコピー/貼り付け] アクティビティで、以下の手順を実行します。

      • Click Plus ドキュメントの画像 on the right side of the Source field, and then select Notebook > Indicate in Excel.

      • In the Excel file, select cell A1 in the Scratchpad sheet, and then click Confirm in the UiPath tab in the Excel ribbon.

        これで、プロジェクト ノートブックの Scratchpad シートの A1 セルをコピーするように指定したことになります。

      • Click Plus ドキュメントの画像 on the right side of the Destination field, and then select DoubleUI > Indicate in Excel.

      • Excel ファイルで、列 A 全体を選択し、Excel のリボンの [UiPath] タブで [Confirm (確定)] をクリックします。

        これで、DoubleUI ファイルの第 1 列にデータを貼り付けるように指定したことになります。

      • [コピーする内容] ドロップダウン メニューから [形式] を選択し、セルの書式設定のみがコピーされるよう指定します。

    5. 2 つ目の [範囲をコピー/貼り付け] アクティビティを既存の当該アクティビティのすぐ下に追加します。

    6. 2 つ目の [範囲をコピー/貼り付け] アクティビティで、以下の手順を実行します。

      • Click Plus ドキュメントの画像 on the right side of the Source field, and then select Notebook > Indicate in Excel.

      • In the Excel file, select cell B1 in the Scratchpad sheet, and then click Confirm in the UiPath tab in the Excel ribbon.

        これで、プロジェクト ノートブックの Scratchpad シートの B1 セルをコピーするように指定したことになります。

      • Click Plus ドキュメントの画像 on the right side of the Destination field, and then select DoubleUI > Indicate in Excel.

      • Excel ファイルで、ヘッダー行 (範囲 A1:D1) を選択し、Excel のリボンの [UiPath] タブで [Confirm (確定)] をクリックします。

        これで、DoubleUI ファイルの範囲 A1:D1 にデータを貼り付けるように指定したことになります。

      • [コピーする内容] ドロップダウン メニューから [形式] を選択し、セルの書式設定のみがコピーされるよう指定します。

    7. 2 つの [範囲をコピー/貼り付け] アクティビティをより簡単に識別するには、各アクティビティの上部のバーで名前を編集します。たとえば、最初のアクティビティには Copy Format Column、2 番目のアクティビティには Copy Format Row を使用します。

      ドキュメントの画像

    8. Click Save in the StudioX ribbon to save the automation, then click Run to execute the automation.The formatting is copied from the two cells in the Scratchpad sheet of the Project Notebook file to the header row and first column of the DoubleUI file. Download example

このページは役に立ちましたか?

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得