# How to write Queue data into Excel?

**URL:** <https://forum.uipath.com/t/how-to-write-queue-data-into-excel/730994>\
**Category:** Help\
**Tags:** help, uipath, question, queue, orchestrator, activities, excel, system\
**Created:** [March 30, 2024, 7:42am UTC](https://forum.uipath.com/t/how-to-write-queue-data-into-excel/730994 "2024-03-30T07:42:29Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Anonymouss](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anonymouss/32/470756_2.png) [@Anonymouss](https://forum.uipath.com/u/Anonymouss)\
**Post date:** [March 30, 2024, 7:42am UTC](https://forum.uipath.com/t/how-to-write-queue-data-into-excel/730994/1 "2024-03-30T07:42:29Z")

</div>

Hii,

I have made 6 different queues into the orchestrator and stored data accordingly,

 ![image](https://global.discourse-cdn.com/uipath/original/4X/c/e/a/ceac084d2ba92660f02fda672a3c9ed74b335fe9.png)

I have done this via UiPath Studio.

 ![image](https://global.discourse-cdn.com/uipath/original/4X/0/f/1/0f16c68c21ac96d18a4fcb1bdce08201da5ea239.png)

Likewise, I have made 6 queues. now I want to retrieve all queue data into a separate Excel file.

What can I do?

---

<div class="post-metadata">

**Author:** ![sanjay3](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/sanjay3/32/365624_2.png) [@sanjay3](https://forum.uipath.com/u/sanjay3)\
**Post date:** [March 30, 2024, 7:57am UTC](https://forum.uipath.com/t/how-to-write-queue-data-into-excel/730994/2 "2024-03-30T07:57:20Z")

</div>

Hi @Anonymouss

You can use Get Queue Items activity for this

[Activities - Get Queue Items (uipath.com)](https://docs.uipath.com/activities/other/latest/workflow/get-queue-items)

---

<div class="post-metadata">

**Author:** ![AJ\_Ask](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aj_ask/32/555384_2.png) [@AJ\_Ask](https://forum.uipath.com/u/AJ_Ask)\
**Post date:** [March 30, 2024, 8:33am UTC](https://forum.uipath.com/t/how-to-write-queue-data-into-excel/730994/3 "2024-03-30T08:33:49Z")

</div>

Hi @Anonymouss

> [@HO To get the all the transaction item from the queue](https://forum.uipath.com/t/ho-to-get-the-all-the-transaction-item-from-the-queue/707852/7):
>
> Hi @copy_writes This is how the basic structure will look as there is limitation for get queue items to fetch only 100 we need to add skip with increase in 100 each time also you need to add if condtion to break the loop if the count is 0 in the queue. Add Skip counter with 100 for next set of queue items. In this you can use the for each queue item to create a datatable with all the data. Hope this helps slight_smile

Hope this helps 🙂

---

<div class="post-metadata">

**Author:** ![Anonymouss](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anonymouss/32/470756_2.png) [@Anonymouss](https://forum.uipath.com/u/Anonymouss)\
**Post date:** [March 30, 2024, 1:54pm UTC](https://forum.uipath.com/t/how-to-write-queue-data-into-excel/730994/4 "2024-03-30T13:54:24Z")

</div>

Hello, @AJ_Ask

I am glad to get answers from your side but I want get data from the queue which is located in Orchestrator-\> Folder Test\_REF → Queue →

 ![image](https://global.discourse-cdn.com/uipath/original/4X/a/9/e/a9ece5fca95cb8490d6d9c68e82d8bc3108709dd.png)

now I want to get all queue Transactions into excel file

I have used “Get Transaction” Activity in UiPath Studio, and passed the Orchestrator Folder name and Queue name  
 ![image](https://global.discourse-cdn.com/uipath/original/4X/d/c/8/dc83266a2a025b8ca290210db82a95f691ccc798.png)

but I didn’t know how can I get those data into variables. Like varQueueItem = QueueName.SpecificContent(“Data1”) etc… can I get data like wise?

and then after I want to pass this variable(varQueueItem) into write cell activity

Might be my question/Problem is understandable.

Thank you.  
Akhil

---

<div class="post-metadata">

**Author:** ![Anonymouss](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anonymouss/32/470756_2.png) [@Anonymouss](https://forum.uipath.com/u/Anonymouss)\
**Post date:** [March 30, 2024, 2:00pm UTC](https://forum.uipath.com/t/how-to-write-queue-data-into-excel/730994/5 "2024-03-30T14:00:39Z")

</div>

Hello Mr. @sanjay3

I have used this Activity

![image](https://global.discourse-cdn.com/uipath/original/4X/d/c/8/dc83266a2a025b8ca290210db82a95f691ccc798.png)

from this activity, I get queues data (in this queue I have stored “Name”, “Surname”, “Test Score 1”, and “Test Score 2” )

and I need only “Test Score 1” and “Test Score 2” data, How can I store in variable

Thank you,  
Akhil

---

<div class="post-metadata">

**Author:** ![AJ\_Ask](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aj_ask/32/555384_2.png) [@AJ\_Ask](https://forum.uipath.com/u/AJ_Ask)\
**Post date:** [March 30, 2024, 2:29pm UTC](https://forum.uipath.com/t/how-to-write-queue-data-into-excel/730994/6 "2024-03-30T14:29:17Z")

</div>

Hi @Anonymouss

Yes you can use

`TestScore = Transcation_item.SpecificContent("Test Score 1").ToString`

 ![image](https://global.discourse-cdn.com/uipath/original/4X/8/7/d/87dfc349961b9a4a141157a709919d06ce25300e.png)

---

<div class="post-metadata">

**Author:** ![Anonymouss](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anonymouss/32/470756_2.png) [@Anonymouss](https://forum.uipath.com/u/Anonymouss)\
**Post date:** [March 30, 2024, 2:52pm UTC](https://forum.uipath.com/t/how-to-write-queue-data-into-excel/730994/7 "2024-03-30T14:52:09Z")

</div>

Thank you @AJ_Ask

I understand this but I have a 6 queue and I want to store each queue’s data in a different Department sheet

![image](https://global.discourse-cdn.com/uipath/original/4X/7/0/b/70bc1d3e323153eca6c17fbc4049715780fae946.png)

I want to make each queue for an Excel file according to the department name.

* * *

According to my knowledge I have to write multiple assign activities and lots of Write cell activity for each queue, But need Optimized solution I don’t want to write multiple time write cell activity and also don’t want to multiple assign activity for each 6 queue.

One again Thank you @AJ_Ask,  
Akhil

---

<div class="post-metadata">

**Author:** ![AJ\_Ask](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/aj_ask/32/555384_2.png) [@AJ\_Ask](https://forum.uipath.com/u/AJ_Ask)\
**Post date:** [March 30, 2024, 3:12pm UTC](https://forum.uipath.com/t/how-to-write-queue-data-into-excel/730994/8 "2024-03-30T15:12:53Z")

</div>

Then you have to use get queue items only or orchestrator API.

1. In get queue items you create datatable of all the relevant data

2.Using write datatable to excel activity you can write it to excel without using the multiple write activities.

---

<div class="post-metadata">

**Author:** ![Gautham\_Pattabiraman](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/gautham_pattabiraman/32/260120_2.png) [@Gautham\_Pattabiraman](https://forum.uipath.com/u/Gautham_Pattabiraman)\
**Post date:** [March 30, 2024, 3:28pm UTC](https://forum.uipath.com/t/how-to-write-queue-data-into-excel/730994/9 "2024-03-30T15:28:04Z")

</div>

Hey @Anonymouss ,

Here is how you can convert the Get queue items activity output to datatable

Use a Build DataTable activity to create the structure of the DataTable with the desired columns.

Iterate through each QueueItem in the IEnumerable using a For Each activity.

Inside the For Each activity, use Add Data Row activity to add each QueueItem’s properties to the DataTable as a new row.

Once data table is created you can easily write the data into a excel workbook.

Hope this helps you out.

Thanks,  
Gauutham.

---

<div class="post-metadata">

**Author:** ![sanjay3](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/sanjay3/32/365624_2.png) [@sanjay3](https://forum.uipath.com/u/sanjay3)\
**Post date:** [March 30, 2024, 5:03pm UTC](https://forum.uipath.com/t/how-to-write-queue-data-into-excel/730994/10 "2024-03-30T17:03:57Z")

</div>

Hi @Anonymouss

Suppose output of get transaction activity is TransactionItem

TransactionItem.SpecificContent(“Test Score 1”).ToString

For Getting All the Transaction to Spreadsheet

Create a Data Table using Build Data Table Activity with Column Name Test Score1 and Test Score2 (output=dt\_TestScore)

Use Get Queue Item Activity for getting the queue items, from the property panel you can select the which type of transaction item you want to put in the spreadsheet, and output of this activity is QueueItems

Use For each for iterating where type argumment is UiPath.Core.QueueItem

In the For Each use Add data row Activity, for eg  
{currentItem.SpecificContent(“Test Score1”).ToString,currentItem.SpecificContent(“Test Score2”).ToString}  
DataTable=dt\_TestScore

After the For each use Write Range Workbook and make sure that you had check on Add headers at the property panel and in the DataTable section put the dt\_TestScore

---

<div class="post-metadata">

**Author:** ![Anonymouss](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anonymouss/32/470756_2.png) [@Anonymouss](https://forum.uipath.com/u/Anonymouss)\
**Post date:** [March 31, 2024, 10:02am UTC](https://forum.uipath.com/t/how-to-write-queue-data-into-excel/730994/11 "2024-03-31T10:02:43Z")

</div>

Hii @AJ_Ask,

I got the solutions and Thank you for helping me in this matter.

Thank you,  
Akhil

---

<div class="post-metadata">

**Author:** ![Anonymouss](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anonymouss/32/470756_2.png) [@Anonymouss](https://forum.uipath.com/u/Anonymouss)\
**Post date:** [March 31, 2024, 10:07am UTC](https://forum.uipath.com/t/how-to-write-queue-data-into-excel/730994/12 "2024-03-31T10:07:25Z")

</div>

Hii @Gautham_Pattabiraman,

It’s working and helpful information for all who face this problem.

Thank you,  
Akhil

---

<div class="post-metadata">

**Author:** ![Anonymouss](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/anonymouss/32/470756_2.png) [@Anonymouss](https://forum.uipath.com/u/Anonymouss)\
**Post date:** [March 31, 2024, 10:10am UTC](https://forum.uipath.com/t/how-to-write-queue-data-into-excel/730994/13 "2024-03-31T10:10:07Z")

</div>

Hii @sanjay3 ,

Thank you for sharing this informative knowledge, I got my answers as I required.

Thank you,  
Akhil

---

<div class="post-metadata">

**Author:** ![Gautham\_Pattabiraman](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/gautham_pattabiraman/32/260120_2.png) [@Gautham\_Pattabiraman](https://forum.uipath.com/u/Gautham_Pattabiraman)\
**Post date:** [March 31, 2024, 10:27am UTC](https://forum.uipath.com/t/how-to-write-queue-data-into-excel/730994/14 "2024-03-31T10:27:23Z")

</div>

Happy to have helped you @Anonymouss

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/uipath/user_avatar/forum.uipath.com/system/32/182466_2.png) [@system](https://forum.uipath.com/u/system)\
**Post date:** [April 3, 2024, 10:27am UTC](https://forum.uipath.com/t/how-to-write-queue-data-into-excel/730994/15 "2024-04-03T10:27:57Z")

</div>

Closed on April 3, 2024, 10:27am UTC

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