「すべてのExcelワークシートの取得」を実行すると、指定したExcelファイルにあるワークシート名を一括で取得することができます。
すべてのExcelワークシートの取得

すべてのExcelワークシートの取得は、アクションペインのExcel→詳細から追加できます。

追加するとダイアログが表示されます。
Excelインスタンス

Excelインスタンスでシート名を取得したいファイルを指定します。すべてのExcelワークシートの取得を追加した時点でExcelインスタンスがひとつしかない場合、自動で選択されます。

インスタンスだけ指定して実行し、メッセージボックスで取得内容を代入した変数(デフォルトでSheetNames)を表示すると、

ファイル内にあるワークシートが全部表示されます。

生成された変数

変数名をクリックして変更できる他、{x}から他の変数にリストを代入することも可能です。

スイッチをオフにすると、変数が生成されなくなります。
エラー発生時

左下のエラー発生時では、うまく動作できなかった場合の処理を設定できます。

「詳細」では、すべてのワークシートを取得できなかった場合を指定できます。
関連記事
指定されたExcelファイルの、アクティブなワークシートを取得する方法です。

Microsoft Power Automate Desktop(PAD)アクション、使い方一覧
Power Automate Desktopの使い方を機能・分類別に参照できるまとめです。
コメント