How to locate the actual first row reading an excel

When using a read range activity with include headers and the first row could be blank how do you determine the actual row index for other rows. I’m trying to locate headers when they may appear anywhere in a document and if the first row is blank this throws off the row index. In this example, the data that I’m interested in starts on row 6 but if I have a blank first row than the index is 5 instead of 6 if that makes sense. Its as if read range omit the first row when blank!

I’m not quite sure what you want here, sorry. With read range it ignores empty cells so are you saying you’re having trouble because the datatble index for the row is different to the row number in excel?

@bbimuyi

In this case, we have to specify the exact range in Read Range Activity and check Add Headers option in it to make first row as Headers.

Hi @bbimuyi

While using read range Activity uncheck the property Add Headers, as that would consider the first row as header, and if the row has no value will create a default name Column1, Column2,… Like that

So in your case we can uncheck that property and can access the column with the column index, and it starts from 0 for the first column…and goes on

Hope this would help you
Cheers @bbimuyi

Correct.

Hi @bbimuyi

Ok fixed it by specifying headers included and starting at A1 not “”. The A1 was the trick

Thanks All

Buddy @bbimuyi
A1 means starting from first cell,
even without mentioning that and keeping as “”, it will start by default from A1
Unless we mention it explicitly like start from E1 or D1, it will implicitly start from A1 by default
Cheers @bbimuyi

1 Like