Excel Reading_#098

Hell guys,

I have a process in which i want to read 3 excels one after other.

The process reading the first excel properly.

when RPA trying to read 2nd excel it is throwing error like below.

For this error i untick the “Add Header” in the property of read range, the thing is that iam using an invoke code activity which is using headers,
when i untick the add headers the invoke code activity showing error.

so is there any alternate way to solve the issue.

Hi @Gokul_Murali

You should uncheck the add headers option, UiPath will create columns and you should use those column names created by UiPath, pass the one that you need to the invoke code

Regards

Hi @Gokul_Murali

If you are taking the columns as a reference in invoke code then you have to check the add headers option in read range workbook activity.

Hope it helps!!

@Gokul_Murali Try reading it to separate Datatables and then you can merge all the Datatables into one by using ‘Merge Datatable’ Activity(Missing Scheme Action in property panel should be ‘Ignored’)

1 Like

@fernando_zuluaga

i tried that also,

iam using an invoke code activity in that iam using header.

when i uncheck the “add header” invoke code activity throwing error.

@mkankatala

when tried but it is showing error like this.

Hi @Gokul_Murali

  1. Use Different Variables for Each Read Range, so the headers won’t interfere with each other.
  2. Store the headers in a separate variable and use that variable in the “Invoke Code” activity, allowing you to untick the “Add Headers” option while reading the data.

@fernando_zuluaga

How can i pass the column in the invoke code which is created by UiPath.

@Gokul_Murali

Check this thread hope it helps

@supriya117

How can i create 2 varaible for the read range

@Gokul_Murali

I mean, For each read range, create a new variable instead of using last one.

@Gokul_Murali

  1. You can use column index inplace of column Name in your invoke code as well
  2. The default column names assigned by UiPath would be Column 0,Column1 etc …so can assign those names as well instead of column index if you want to

Hope this helps

Cheers

@Gokul_Murali In the property panel of the ‘Read Range Workbook’ activity, under the output option you can create new variables by pressing Ctr+K and then give a new name
eg: dt_Input1,dt_Input2 and so on

Please refer this video to create a variable

it will create columns like: Column1, Column2, etc… check which is the column that you need to use and pick that one

@Anil_G
@fernando_zuluaga
@mkankatala
@Vikas_M
@Brian_Mathew_Maben
@supriya117

Guys i have resolved the issue by adding a check in the end process ie,

first it will read excel and process, After completing the first excel it will come to the end process and check for any excel is there or not in the folder if there

it will go to init state and read the 2nd excel .

Note :-

it is processing the first file and after that it is reading the 2nd excel also, login to the application again but process stop saying that no more data to process(In Get Transaction state) even though data is there in the 2nd excel.

so is it possible to process the 2nd excel after processing the 1st excel in the Reframework in the first run.

@Gokul_Murali

Ideally from end process it wont go back…that would be the lst state…also if you wnat to read each excel then change your transactionitem as string and pass each excel for each iteration then it will read all excels one by one and then end the process

Cheers

Nope i have done it and it is reading the 2nd excel after completing the first excel.

The thing is that after reading the 2nd excel it is successfully login to the application also.

but showing no transaction data to process

REFRAMEWORK :-1:

Condition in end process:-

MicrosoftTeams-image (14)

Studio logs:-

See here it is reading the 2nd excel even though the data is there it is showing no data to process.

@Anil_G

Any Idea for this issue?