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

Warning message when exporting to excel 2007

2 Answers 82 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tolga
Top achievements
Rank 1
Tolga asked on 15 Oct 2008, 10:01 PM
I am using the newest RadGrid and its export funationlity. THe data is being exported just fine, however, there is this annoying security warning message.

Question 1:

How do I get around this?

Question 2:

I am able to get around this by exporting to CSV. However. now, I am not able to add style attributes to certain cells. I have number cells whos content sometimes start with 0. These leading zeros are automatically removed unless I am able to add a style attribute to that cell. How do I fix that?

--tolga

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Oct 2008, 07:59 AM
Hello Tolga,

I'm not sure of what is the error message that you get on your side, but i found  a similar scenario being discussed about in the following forum link. Check it out and see if it helps.
Export to Excel 2007 Warning

Also, to display numbers starting with zero as such on exporting you can refer the following forum link
data "00001" became "1" after export to excel

Thanks
Princy.
0
Daniel
Telerik team
answered on 16 Oct 2008, 08:17 AM
Hello Tolga,

Question 2: To avoid this behavior you should add DataFormatString property to your columns as shown in the sample code-snippet below:
<telerik:GridBoundColumn DataField="Description" DataFormatString="&nbsp;{0}&nbsp;" HeaderText="Description" 
    SortExpression="Description" UniqueName="Description"
</telerik:GridBoundColumn> 

Question 1: Currently it is not possible to avoid this message. The possibility of appearance of such message is mentioned in the documentation: Export to Microsoft Excel/Word/PDF/CSV

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Tolga
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Daniel
Telerik team
Share this question
or