I have this excel sheet and I have to get only the total value of 56$ and I need the count of total values for ex: in this the count is 3 how to approach this in studio X
Actually the first total I need which is 56$ and next total values are sum of the above ie28,28 instead I mentioned 13,13 and I need the count of all those total values
I need the first total I.e 56$ that I will be updating in another excel and the other information I need is the count of total values in this image we have count of 3 let me know if this is understandable or else will post an excel photo
- Find /replace actvitiy and find the value total.
- Once you find total…add one number to it to get the next row
- Now to get count…use for each row in excel and start with the cell next to the total cell and count till you get a blank value
Cheers
Count part not able to get it?
For the count …ideally it start from the total row
So use read range activity and gice the cell number as the total cell then it eould read till the end of that table from which you can do dt.Rowcount
Alternately as mentioend above run a loop and keep on incrementing the row number and get the value till the value is null…which gives the count
Cheers
Hey Anil, I got the total value but count I am unable to get it
I hope you got the total by findign total keyword then added 1 and got the value
now you need to decrease 1 from the column index and then use read range
cheers
This is the method I used to get the amount and stored in valuetotal. After assign do I need to use read range
I am getting row count as 17
that good
looks like you read whole of the table now
now save the currentrowindex+1 value to index variable
use a while loop and give condition as booleanvariable
set the value of booleanvariable to true before the loop
now inside loop use if condition to check if String.IsNullorEmptydt.Rows(index)(0).ToString.Trim)
on then use assign and assign booleanvariable to false
on else side use count = count+1
count is a integer variable
cheers
While loop is not available in studiox