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

[Solved] Remove all Styles for Excel Export

2 Answers 271 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 29 Sep 2009, 05:27 PM
Is there an easy way to remove all styling for an Excel export.  Out of the box I get an export with a background color and no grid lines. Is there a way to prevent any style from passing to the Excel document?

2 Answers, 1 is accepted

Sort by
0
Schlurk
Top achievements
Rank 2
answered on 29 Sep 2009, 07:12 PM
The following should export just data, and no styles etc.:

 
this.RadGrid1.ExportSettings.ExportOnlyData = true

You can find more info about it in this documentation article.
0
Daniel
Telerik team
answered on 29 Sep 2009, 09:52 PM
Hello Robert,

This is the way Microsoft Excel interprets the HTML Excel content. If you open the output file in Notepad++ or similar, you will notice that we don't explicitly set background color or grid lines.

I recommend you switch to ExcelML format if this appearance is not suitable for your scenario.

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Robert
Top achievements
Rank 1
Answers by
Schlurk
Top achievements
Rank 2
Daniel
Telerik team
Share this question
or