Extract specific column data from excel file

Hi All,
I am stucked in one problem.

Example- col1 col2 col3
data1 data2 data3
data4 data5 data6
data7 data8 data9
Suppose data5 have value arquivo.
I have to extract whole row data which has value arquivo from excel and put in other excel
How to proceed? Can anyone please help.

@farheenfatma61

Welcome to forums

Use Read Range activity->Declare a variable for OutPut which is a Datatable

Now Use If Condition DatatableVariable.Rows(1).Item("Column2") = "arquivo" to check data5 in your case

Once it is equal then place Insert / Add DataRow activity and give the Datarow Value

Check below for your reference

Hope this helps you

Thanks

thank u for the help.

But my issue here is different.
I attched a book.xlsx sample file.
I have to extract these data from excel file:

  1. if column “document” contain “Succeso” then i have to extract the all the row of the same file
    output should be like this-

|Fil1|informica|need to update value|
|Fil1|Avisa|need to update Pan valuw|
|Fil1|Successo|completed|[Book1.xlsx|attachment]

(upload://tMsTleEjbfkpbYESbgVionzxo9T.xlsx) (8.9 KB)

@Srini84
Book1.xlsx (8.9 KB)

i attached sample file here

@farheenfatma61

For this case you can check as below

Hope this helps you

Thanks

@Srini84
can u please help me as i have to resolve the issue urgently.

@Srini84
the output should be like this -

|Fil1|informica|need to update value|
|Fil1|Avisa|need to update Pan valuw|
|Fil1|Successo|completed|
|Fil3|informica|need to update value|
|Fil3|Avisa|need to update Pan valuw|
|Fil3|Successo|completed|

@Srini84
i have extract all the data of that filename which contain Successo in its document column

@farheenfatma61

Can you be clear?

You want the output to write into textfile or Excel file?

Can you share the exact output requirement?

Thanks

@Srini84
i want the output in excel file.

Suppose if the last line of the column “File name” have value “Successo” then i want to extract all the 3 row of that file name.
eg- if Fil1 in the column “filesname” have value successo in its line then i have to write all the row of that Fil1 in excel sheet.

o/p
|files name|document|message|
|Fil1|informica|need to update value|
|Fil1|Avisa|need to update Pan valuw|
|Fil1|Successo|completed|

@Srini84
output.xlsx (8.7 KB) `
i attached the output file

@farheenfatma61

Check as below

Hope this helps you

Thanks

@Srini84

here only one line of Fil1 come but i have to extract all the three lines of Fil1 in excel file

@farheenfatma61

You need all Fil1 files names to filter?

Thanks

@Srini84
my query heere is that if last line of Fil1 contain Successo in column(document) then i have to extract all the row which has Fil1in column(files name)

@farheenfatma61

Check attached

Output.zip (8.7 KB)

Hope this helps you

Thanks

@Srini84
Thank you.

But it worked for only 1 file but i have multiple files in input excel sheet which i have to filter in other sheet.
How to do that can u please explain?

@Srini84
i have multiple files like Fil1, Fil2, Fil5 etc and have to extract all those in excel file.

can u please explain how to do that?

@farheenfatma61
in general we can adress the case with a filter / filter approach:

  • first filtering to all rows with document = Sucesso
  • iterate over the first filterresult and do filtering to the corresponding files name
    • merge the part filterresult to finalFilterResult

Find demo XAML here:
farheenfatma61.xaml (11.0 KB)

producing following output:
grafik

@ppr

Thank you.
One more query if i want extract the rest data from “Book1.xlsx” which does not come in output.
How to do that?
Can u plz explain.