How to get the data from Orchestrator Queue to Excel Sheet

Hi All,

I am trying to get the data from Queue by using Get Queue Item and trying to add that data to excel sheet using variables.
I am able to add the data from excel to Queue by using Add Queue Item. I need the same data from Queue to add it to new excel sheet.
Can anybody help me on this.

Regards,
Roselin

2 Likes

@RoselinYohan

Use the below in assign activity to get the data from the queue.
strValue = in_TransactionItem.SpecificContent(“Your Column Name”).ToString

After getting the value, you can write the same into excel.

@singhonkar

I Tried with this but still getting an error.
Please find the attachments.

Regards,
Roselinfetchqueue.xaml (6.5 KB)

Hi @RoselinYohan

When you use get queue items it will return a collection of queue items. use Get Transaction Item which will give single row with Uipath.Core.Queueitem data type.
then you can use the dt2.SpecificContent(“CashIn”).ToString to get specific text.

Regards,
Vijay Kumar C.

@RoselinYohan

I went through your file and you need to use Get Transaction Item acitivity instead of Get Queue Items activity because ".SpecificContent function is not a member of QueueItem class .

Get Transaction Item output will be of QueueItem type whereas Get Queue Items output will be of IEnumerable type , means collection of Queue Items. So, this way you’ll not be able to fetch the data from the same.

I hope this clears your doubt. Let me know if you still have any doubts.

@Vijay_Kumar_C
@singhonkar

I tried with the above code; but getting error as “The given key was not present in the dictionary”…

Do I need to create any Config file or any other file.

Please find the attachment.

@RoselinYohan

Have you uploaded few rows of data on the orchestrator ? Get Transaction Item will retrieve the data from the orchestrator queue and change the status from new to in progress.
If No, then please upload few rows of data to orchestrator with the same queue name which you’ve used in Get Transaction Activity.

@singhonkar
Onkar,
I have rows/data in Queue but still am getting the same error.

@RoselinYohan

Can you share the screenshot for the data uploaded in orchestrator( for one entire row) and latest xaml file as well.

Hi @RoselinYohan

Before using Get Transaction Item please add input values to Queue by using Add to Queue activity.

dt2.SpecificContent(“CashIn”).ToString - in this line CashIn is the Key that bot is trying to retrieve. This error will come when the key you are trying to retrieve is not present in Queue.

Regards,
Vijay Kumar C.

@Vijay_Kumar_C
@singhonkar
Please find the attached file which I used to add the data/row to Queue.
But still getting same error.
dispatche.xaml (6.9 KB)
fetchqueue.xaml (6.5 KB)
Trans1.xlsx (8.2 KB)

@RoselinYohan

Can you please share screenshot for Dispatcher file as it’s showing corrupted to me and not able to see the activities inside that.

Hi @RoselinYohan

in dispatche.xaml while adding to queue you have to provide ItemInformation there you have to specify the Name as “CashIn” and in value keep row(“CashIn”).tostring. then it will work fine.

Regards,
Vijay Kumar C.

@singhonkar

Please find the snapshot.

@RoselinYohan

Please verify whether the argument values specified in the ItemInformation are same or not.

@singhonkar

No… Am not creating any arguments.
Simply uploading the data to Queue from dispatche file and trying to fetch them from fetchQueue file

@RoselinYohan

I’m wondering then how it’s uploading the data to the orchestrator queue. Could you please try once by adding the argument like the same i showed in the last screenshot.

Let me know in you need any help in that.

@RoselinYohan

Please refer to arguments shown in ItemInformation in below screenshot :

@singhonkar

I tried… getting error a “Row is not declared”

@RoselinYohan

Keep Add Queue Item under For each row activity. Please don’t notice my background. It’s just for testing purpose :smile: