Unable to get rows count

MohanGururaj

New Member
Hi Folks,

I need sheet count for all the workbook in the particular folder. This is my flow chart.

View attachment Flow.JPG

Overview:
Now there are three files, each have 3 sheet tabs.
So, Get worksheet names will update "Sheettab names" collection one by one.
Then, I have inserted Append rows to collection to get all the 9 sheet tab names and to be stored in "Output collection"
I have inserted "Count rows" from "Collections" VBO and its need to update the count in "Sheet count" data item once the loop is completed

But when I drag the "Output collection" into Collection name (Input tab) I am getting the error as below.

View attachment Error.JPG

Even I have tried this way,

View attachment second try.JPG

But no luck, I am getting the below error. Unable to trouble shoot where is the mistake...

View attachment Error2.JPG

Kindly provide your suggestions.

Thanks in advance
Mohan G
 

Sachin_Kharmale

Active Member
Hi Mohan,

Add New action in Collection Manipulation Row Count
View attachment 1560658371513.png


Row Count action Input will be Input Collection
View attachment 1560658389603.png


Add Code Stage Input will be Input Collection
View attachment 1560658408112.png
Code stage Output will be Row Count
View attachment 1560658427041.png


Action output will be Row Count
View attachment 1560658446936.png


Code Stage code will be
View attachment 1560658470512.png

Publish Action and call from process studio
View attachment 1560658566794.png
Call Action from Process Pass your [Output Collection] with square bracket it will return row count
View attachment 1560658609087.png

Copy and Paste Bellow Code in your Code Stage

Dim Count As Integer = 0
For Each row As DataRow in Input_Collection.Rows
Count = Count + 1
Next
Row_Count=Count


I hope it will Help you.
 
Top