开发者

Loop through all cells in a Excel Column to the end

Probably simple once i see the correct code but what is the best w开发者_StackOverflow社区ay to loop through a specific column in a worksheet until the end?


It's pretty simple. Just create a range object that points to the range you want to start at, then loop through each offset from that range until you get to a blank cell.

int i = 0;

while (target_range.Offset(i, 0).Value != "")
{
    i++;
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜