I have a dataset of 15 columns. I want to create an excel sheet with 4 columns of this dataset. How can we select a subset of columns in a datatable? Thanks Rohit
You can use DefaultView.ToTable for this:
DefaultView.ToTable
var table = table.DefaultView.ToTable(false, "Column1", "Column2", "Column3");
Here's the documentation: DefaultView.ToTable Method
Source: https://habr.com/ru/post/1411154/More articles:Image Reduction Techniques - image-processingWordpress error with non-latin characters - wordpressCheck if the array contains the entire element of another array? - phpTwitter, OAuth, Hammock, TweetSharp, and Windows Phone 7 - oauthR: apply expression to take the sum of the number of non-NA values ββin multiple columns - functiondivisibility gradient - c ++Auto Computed Fields - mongodbMongolian data modeling / voting updates (up and down) - mongodbMonoDevelop - Wildcards in a csproj file - c #Kernel APL, J, K - jAll Articles