This is a migrated thread and some comments may be shown as answers.

Export to Excel

3 Answers 172 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Elver Emilio Cano Cardona
Top achievements
Rank 1
Elver Emilio Cano Cardona asked on 21 Dec 2010, 11:34 PM
Good afternoon

i use the tools export

 

 

 

ExportToExcelML

 

exporter = new ExportToExcelML(rgvGrid);

 

exporter.SummariesExportOption =

SummariesOption.ExportAll;

 

exporter.RunExport(sFilepath);

and its works correctly but i need export only several columns of the gridView.. i have been looking how i could do that..
i need to export only two columns.. not all..

thanks for your help...
best wish..

3 Answers, 1 is accepted

Sort by
0
Richard Slade
Top achievements
Rank 2
answered on 21 Dec 2010, 11:58 PM
Hello,

the quickest way I can think of to do this is to hide the columns in the grid that you don't want, and run the export with the following settings
Dim exporter As ExportToExcelML = New ExportToExcelML(Me.RadGridView1)
exporter.HiddenColumnOption = HiddenOption.DoNotExport
exporter.RunExport("FILENAME")

Hope that helps
Richard
0
Elver Emilio Cano Cardona
Top achievements
Rank 1
answered on 22 Dec 2010, 04:11 PM
Hi Richards

I understand but i put hidden the columns that i need to export in time execution i can see those columns..
for example i hava a column in a GridView like CheckBox the user chose several options.. with CheckBox..thats why this columns always must be visible then when the user export this column in excel its appear like "FALSE" OR TRUE. i don't need it..i need export without this column..

Thanks for your help..

0
Accepted
Richard Slade
Top achievements
Rank 2
answered on 22 Dec 2010, 05:00 PM
Hello,

As far as I know this is not possible. You have three options when exporting hidden columns which are
ExportAlways
DoNotExport
ExportAsHidden (default)
Have a look at this documentation for more information

regards,
Richard
Tags
GridView
Asked by
Elver Emilio Cano Cardona
Top achievements
Rank 1
Answers by
Richard Slade
Top achievements
Rank 2
Elver Emilio Cano Cardona
Top achievements
Rank 1
Share this question
or