Warning message when exporting to excel 2007

3 posts, 0 answers
  1. Tolga
    Tolga avatar
    28 posts
    Member since:
    Jun 2007

    Posted 15 Oct 2008 Link to this post

    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. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 16 Oct 2008 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 16 Oct 2008 Link to this post

    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.
Back to Top