How can I write one column to an Excel file


#1

How can I write one column from a datatable which has some columns to an Excel file .
Like this picture.xlsx (43.6 KB)


#2

@oitot, directly use this query in write range, if you want distinct elements from that column
datatable.DefaultView.ToTable(True,“Column Name”)

If you want all values (including duplicate) make that true to false !

Regards,
Dominic :slight_smile:


I need to retrirve the unique countries names from data and store it in some variable?
#3

@oitot Refer this workflow
writeColumn.xaml (7.9 KB)


#4

HI Dominic
I used “datatable.DefaultView.ToTable(False,“Column Name”)”. It worked !
Thanks so mush!!!


#5

Hi Bharat.
Thanks ,it worked !