Set Cell Value, Collection

#1
Hello Everyone,
I am stuck in below placees while automating one solution, please help me with this.
- I need to write to Excel Cell : Value is 0001234, But when I am using Set Cell Values and saving it. Value is automatically changing to 1234, after save. How to solve this ?
- There is need to add a value in the excel wrt to same record (means align to same row no). How to do this?
For Example:
Row 1: (Headers): Name Age Gender
Row 2: Ayan 12 {value} - Here i need to add Gender i place of {value}
Row 3: .........
.
.
- Here in the above query I can not loop through Collection, cause requirement is to use Queue Items.
Thank in advance.
 
#2
You can use Get Next Item from the Work Queues VBO. This will load the first pending item from the work queue into a collection. (Blue Prism training documents usually call this collection Item Data.) Then, you can add the Gender column to the collection/or if it already exists, update the Gender column value as needed and Set Data to save the updates to the work queue. If you need to write the value back to Excel, you can use Write Collection in the Excel VBO (or Set Cell Value in the same VBO if you need to write it to a specific cell). Repeat for the next pending item by going to Get Next Item again, and so on until there are no more pending items.

As for the leading zeroes being truncated, you can format the cell as Text before writing the value. Use the Format Cell action in the Excel VBO. Then do the Set Cell Value step.

Please let us know your results.
 
Last edited:
Top