I need to extract the datatable which starts from the column named “Fornitore”.
The position of the table may be not fixed.
How to extract the datatable adn filter only the rows hich have “Codice CIG” column with a value?
Fine
we can start reading the excel with read range activity with range mentioned as “A6” and make sure that the Add headers property is enabled
if the table position is not stable
then read the whole table with add headers property disabled and get the output with a variable of type datatable named outdt
–now use a for each row loop and pass the above variable as input,
–inside the loop use the if condition and mention like this row(0).ToString.Equals(“Forniture”)
if true it will go to THEN part where we can have our sequence of retrieving the data from the datatable else it will go to ELSE part where we can leave it empty so that nothing will happen for those rows (above the row having value “Fornitore”)
make sure that we can use only column index and not columnname as we have disabled the add headers property in the read range activity
Fine
lets do one thing
–first use a read range with add headers property disabled, range as “” and get the output with a variable of type datatable named dt
–now use a for each row loop and pass the variable dt as input
–inside the loop use the if condition and mention like this row(0).tostring.Contains(“Fornitore”)
if this is true it will go to THEN part where we can get the row index like this with a assign activity int_index = dt.Rows.IndexOf(row)+1
where int_index is a int32 variable
–now next to this for each row loop activity use a READ RANGE ACTIVITY again and add headers property enabled this time with range as “A”+int_index.ToString
and get the output with a variable of type datatable named Finaldt
–now this Finaldt will have the datatable with headers