how to get excel values

venkat basa

New Member
Hi RPA peoples,

i have to read the XL cell values xlfile.PNG dynamically,

for example i have xl data from A1 cell to L1 cell
i have to loop the data from A1 to L1 dynamically,please find Attached image,
i have to ready dynamically from A1

Please help me how to read


Thanks & Regards
Venkat
 

VJR

Well-Known Member
Staff member
Hi Venkat,

Below is one of the options to read all rows of all columns of data in an Excel.

TaskExcel.jpg

- Loop through each row of the Excel (you don't need to know the number of rows in this case it will take automatically)
- arrReadExcel is an Array type variable which holds the Excel data and can give the dynamic number of columns and rows in the system variables ArrayColumns and ArrayRow respectively.
- The Message Box will show each row of data for each column.
- A ColumnTimes counter variable is used to increment in order to read data from each column and reset back after every end of inside loop.

Alternatively you can also read the data from the array itself as below, but you will need to use Row and Column variables to loop through them.
eg; $arrReadExcel(1,2)$ will give data from 1st row and 2nd column of the array. Instead of 1 and 2 you need to use variables and increment them as needed.
 

thanhnguyen

New Member
how to define dynamic array and assign value to each row & column.
for example
select distrinct (data1) as col1 from excelsheet
then i have 10 records. how to re-define array variable so i can start loop through data from sql record set to array (row,1)= datasetcolumn (1)
 
Top