How to get specific multiplecolumns name with data

Hello Everyone,

I want to extract 5 columns from below image ( costumer name,case id, match type etc) and paste in other sheet so like this multiple excel files are there

Thanks

Hi @suraj_gaikwad

You can try with Filter Data table activity

Regards
Gokul

1 Like

Look out the Image for your reference

Another method @suraj_gaikwad

DTOut = Dtinput.DefaultView.ToTable("False","Column1","Column2","Column3")

@Gokul001

I tried but it’s taking all data

Thanks

It will take all the records from the specific column as you metioned @suraj_gaikwad

1 Like

@Gokul001

I want only specific columns from that table with data but it’s taking all columns

Hi @suraj_gaikwad

Can you share the Scteenshot of the activity?

Regards
Gokul

1 Like

HI @suraj_gaikwad

Check out the XAML file

06.10.2023_Forum.xaml (8.1 KB)

Regards
Gokul

1 Like

Thanks

Check this XAML file

1 Like

you can try this it will work

In a data table i have 4 columns but i need only the two columns that are Names and ph

try this syntax it will work

dtInput.DefaultView.ToTable(false,"Names","ph")

for reference you can see the output

input : -
image

output: -

image
@suraj_gaikwad

1 Like

Hi @suraj_gaikwad ,

Could you maybe check the Datatable value in the Debug Panel, if indeed the Column Names are the ones that was present in the Excel ?

We have some doubts on whether the Range of the Excel sheet was selected according to what was needed.

1 Like

@Gokul001 @supermanPunch @Praveen_Mudhiraj

Column name start from row 6

Thanks

In this image also column name start from 2? @suraj_gaikwad

Can you share sample excel file?

1 Like
dtInput.DefaultView.ToTable(false,"Names","ph")

you can mention the columns names what ever you want instead of Names and ph

@suraj_gaikwad

1 Like

@suraj_gaikwad ,

Could you keep the Range property as A6 and check if not already done ? Considering the row 6 mentioned was from the Excel sheet reference.

dtInput.DefaultView.ToTable(false,"Case ID","Customer Name","Case Type","Match Type","Alert ID")

you can try this instead of filter data table activity like this

Note : - dtInput is your data table

@suraj_gaikwad

1 Like

challenge.xlsx (9.9 KB)

This is for sample

@supermanPunch @Gokul001 @Praveen_Mudhiraj

Thanks

from this excel what you need as exactly output columns

@suraj_gaikwad

1 Like