Automation that counts in the entire worksheet as the data might be in some "n" number of rows. so it should count only the rows having data.
I want to count number of rows containing data in a worksheet having. I want my Automation to count in the entire worksheet as the data might be in some "n" number of rows. so it should count only the rows having data.
Please help me in this.
***Updated by moderator: Lochan to create new post from reply***
To do this you would iterate through each line using a ForLoop. The forLoop would start at 1 (or 2 if you have a header) and increment by 1. The index from the loop would be concatenated (use a StringUtils component as it has a Concat method) with a column letter where the letter is whichever cell you want to check on...A2 for example). You can then call GetCellValue on each of those cells and check to IsNullOrEmpty (again using the StringUtils). This works great for smaller sheets. If you want to try getting the used range, look at the post below. The only issue with the UsedRange is it isn't entirely accurate all of the time (as illustrated in the post).