3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

WinActor_繰り返しのプロパティ(データ数)

Posted at

今更ながら…###

皆さんはWinActorの繰り返しのプロパティに何を使っていますか?
作成するシナリオ次第ですが、私は条件式や回数を使うことが多いです。
何気に繰り返しのプロパティを見てると「データ数」という項目があるのを見つけました。
image.png
調べてみると便利そうだったので、少し紹介したいと思います。

繰り返しのプロパティ(データ数)の説明###

繰り返しのプロパティ「データ数」に
1行目がヘッダー行、2行目以降がデータ行で構成された
ExcelファイルまたはCSVファイルのパスを指定すると
設定されたファイルのデータ行を読み取って繰り返し処理を行う。
読み取ったデータ行の項目はヘッダー行と同じ名前の変数に格納される。
image.png

実際に動かしてみた###

今回のシナリオは繰り返しのプロパティにデータ数でExcelファイルパスを指定し、
読み取った結果を待機ボックスで出力するというものです。
image.png
以下、実行結果です。
ループ1回目
image.png
ループ2回目
image.png
途中割愛
ループ30回目
image.png
最後の行まで読み取ることができました。

使ってみて###

1行目がヘッダー行になっているExcelファイルやCSVファイルを
1行ずつ処理するのであれば変数へのデータ読み込み(事前に変数の作成が必要)と
繰り返しを同時に行ってくれるので便利に感じました。

3
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?