Datatable.rows.count not matching

When there are 11 rows, it returns 10 and when there is 1 row, it returns nothing.
One additionally strange thing is when there is 1 row, for each does not even start. :roll_eyes:

Could you explain me why?
Sample_Columns[1].xlsx (8.5 KB)
Main.xaml (7.8 KB)

I am doing Level 1-9!

Hi @Daun.
Can you show us the Excel file?
Because the first row may be the header.

3 Likes

@Daun
Can you post the data sample and some details on how you count (e.g. statement)?

@ Jan_Brian_Despi, @ ppr

I attached the xaml and excel: Thank you!

1 Like

ok - @Jan_Brian_Despi mentioed check the add headers flag according your requirements:
grafik

The Count can be retrieved in a one liner statement:
Assign Activity:
to: YourCountVar as Int32
Value: inputsTable.Rows.Count

Hi. You should not check it because there are no headers in the Excel file :slight_smile:

4 Likes

I checked the “Excel Application Scope” property and could not find “Header” but in the “Read Range”, there was!

Thank you!

@Daun refer to @Jan_Brian_Despi about add Headers (does mean: tick off)

I reviewed your workflow and see that your tried to reimplmented a few things that are already in place:

  • DataTable Count - use the statement from above
  • index for the iteration: you can configure here
    grafik
  • so you dont need to retrieve with indexOf

Kindly note: For retrival the Row Count there is no need for for each row activity. it can be done like:

Let us know your open questions

@ppr @Jan_Brian_Despi

The output index is so gooD:)

Probably this lesson should be deprecated!

image

As for the datatable count, I just tested! :slight_smile:

Thank you!

1 Like

No problem :slight_smile:

3 Likes

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.