複数のセルの値を代入するやり方を教えてください

UiPath初心者です。タイトルの事、お願いします。

エクセルの表の一部(ここではB2からB4)の値を一つの型に代入します。
This image shows a spreadsheet listing various countries in one column and their respective capitals in another column. (Captioned by AI)

以下のようにプロセスを組んでみました。


型の種類は以下になります。


結果は以下の通りになります。

どのように修正すればよいか、教えていただけるとありがたいです。
よろしくお願いします。

Hi @hiroshi_ota ,

The variable type for cellValues should be String.
If you want to store the cell values range B2 to B4 in array of string, then you can try this way


こんにちは

方法はいくつかありますが、繰り返し(Excelの各行)アクティビティを使用する場合は、セル読み込みは不要です。(既にCurrentRow.ByIndex(0)でそのセルの値が取得できるので)
またこのケースは配列よりもList<T>を使う方が良いでしょう。

サンプル
Sample20241007-1.zip (10.0 KB)

他にも範囲読み込みでDataTableとして一括で読み込む方法もあります。
(目的にもよりますが、こちらの方がパフォーマンスは高いかもしれません)

thank you!
the process is little complicated for me, but i’ll look into it so that i can understand deeper

ありがとうございます。とても勉強になります。

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.