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

Excel exportation problem

1 Answer 49 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Oliver
Top achievements
Rank 1
Oliver asked on 30 Apr 2012, 04:44 PM
Hi,

I'm using V2010.3.1314.35 of Telerik and when I export my grid content to an Excel file format, Excel refuse to open
it with an error message. My RadGridView can contain data such "<Service>" and some DateTime.MinValue.

The problem seem's to be related to the kind of data I have in my grid but how I can solve my issue.

Here is my exportation method:

private void export()
        {
   stopRefreshTimer();
   try
   {
    try
    {
     const string extension = "xml";  // ExcelML is in XML. This xml file is intended to be opened by Excel
     const ExportFormat format = ExportFormat.ExcelML;

     SaveFileDialog dialog = new SaveFileDialog
     {
      Title = LocGeneral.GetControlText("ExcelExportation"),
      DefaultExt = extension,
      Filter = String.Format("{1} files (*.{0})|*.{0}", extension, "Excel"),
      FilterIndex = 1
     };

     // In this implementation, we do:
     // - If no items are selected in the grid, we export all items. In fact, the case where only 1 item is selected is considered as an intent to have them all.
     // - If 2 items or more are currently selected, we only export these items. This is considered a partial selection.
     IEnumerable allItems = (IEnumerable)ItemsList.Items;
     IEnumerable selectedItems = (IEnumerable)ItemsList.SelectedItems;
     int selectedItemCount = (ItemsList.SelectedItems != null && ItemsList.SelectedItems.Count > 0) ? ItemsList.SelectedItems.Count : 0;
     
     if (dialog.ShowDialog() == true)
     {
      formatGridDataBeforeExporting(selectedItemCount > 1 ? selectedItems : allItems);

      using (Stream stream = dialog.OpenFile())
      {
       GridViewExportOptions exportOptions = new GridViewExportOptions
       {        
        Format = format,
        ShowColumnFooters = false,
        ShowColumnHeaders = true,
        ShowGroupFooters = false,
        Items = (selectedItemCount > 1) ? selectedItems : allItems
       };

       ItemsList.Export(stream, exportOptions);
      }
     }
    }
    catch (Exception ex)
    {
     // Tell the user that exportation is not possible at this time. Ex: Selected file is in use.
     ClientUtilities.AlertDialog(this, LocGeneral.GetControlText("Error"), ex.Message);
    }
   }
   finally
   {
    modifyRefreshTimer();
   }
        }



Here is the new created Excel file:
<?xml version="1.0" encoding="UTF-8"?>
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="urn:schemas-microsoft-com:office:spreadsheet">
<Styles>
<Style ss:ID="GeneralDate">
<NumberFormat ss:Format="General Date"/>
</Style>
</Styles>
<Worksheet ss:Name="Worksheet1">
<Table>
<Column ss:Width="120"></Column><Column ss:Width="104"></Column><Column ss:Width="127"></Column><Column ss:Width="112"></Column><Column ss:Width="102"></Column><Column ss:Width="93"></Column><Column ss:Width="61"></Column><Column ss:Width="84"></Column><Column ss:Width="108"></Column><Row>
<Cell ss:Index="1"><Data ss:Type="String">Date d'ouverture</Data></Cell><Cell ss:Index="2"><Data ss:Type="String">Heure d'ouverture</Data></Cell><Cell ss:Index="3"><Data ss:Type="String">Date de fermeture</Data></Cell><Cell ss:Index="4"><Data ss:Type="String">Heure de fermeture</Data></Cell><Cell ss:Index="5"><Data ss:Type="String">Poste de travail</Data></Cell><Cell ss:Index="6"><Data ss:Type="String">Location</Data></Cell><Cell ss:Index="7"><Data ss:Type="String">Utilisateur</Data></Cell><Cell ss:Index="8"><Data ss:Type="String">Module</Data></Cell><Cell ss:Index="9"><Data ss:Type="String">Durée</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-01-24T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">07:45</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">15:11</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">albany-ris</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">server room</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String"><Service></Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Business Logic</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">94.07:26:03</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">11:25</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">11:25</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">CHRISTIE-A16B51</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">Server Room</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String"><Service></Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Business Logic</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:00:00</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">11:26</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">11:26</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">CHRISTIE-A16B51</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">Server Room</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String"><Service></Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Business Logic</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:00:00</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">11:27</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">11:27</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">CHRISTIE-A16B51</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">Server Room</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String"><Service></Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Business Logic</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:00:00</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">11:27</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">11:27</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">CHRISTIE-A16B51</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">Server Room</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String"><Service></Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Business Logic</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:00:00</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">15:07</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">16:39</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">CHRISTIE-D168AE</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">Server Room</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String"><Service></Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Business Logic</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">01:32:19</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">15:19</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">15:21</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">CHRISTIE-D168AE</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">Server Room</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String">Superuser</Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Manager</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:01:56</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">15:25</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">15:26</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">CHRISTIE-D168AE</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">Server Room</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String">Superuser</Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">RIS</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:00:50</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">15:26</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">15:27</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String">Superuser</Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Manager</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:01:11</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">15:41</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">15:45</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String">Superuser</Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Manager</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:04:22</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">15:46</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">15:48</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String">Superuser</Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Manager</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:01:57</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">15:52</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">15:53</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String">Superuser</Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Manager</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:01:27</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">16:04</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">16:06</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String">Superuser</Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Manager</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:01:19</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">16:05</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">16:07</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String">Superuser</Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Manager</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:01:38</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">16:10</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">16:11</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String">Superuser</Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Manager</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:01:24</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">16:18</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">16:27</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String">Superuser</Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Manager</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:08:34</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">16:40</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">17:39</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">CHRISTIE-D168AE</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">Server Room</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String"><Service></Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Business Logic</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:58:07</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">16:41</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">16:52</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String">Superuser</Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Manager</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:11:30</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">17:25</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">17:26</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String">Superuser</Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Manager</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:01:32</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">17:42</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">1980-01-01T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">00:00</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">CHRISTIE-D168AE</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">Server Room</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String"><Service></Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Business Logic</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">-11805.17:42:14</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">17:43</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-27T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">17:45</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String">Superuser</Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Manager</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:02:00</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-30T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">09:11</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-30T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">10:48</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String">Superuser</Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Manager</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">01:37:18</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-30T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">10:59</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-30T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">11:01</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String">Superuser</Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Manager</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:01:35</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-30T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">11:12</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-30T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">11:13</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String">Superuser</Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Manager</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:00:58.5930000</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-30T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">11:16</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">2012-04-30T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">11:17</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String">Superuser</Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Manager</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">00:00:43.7800000</Data></Cell></Row>
<Row>
<Cell ss:StyleID="GeneralDate" ss:Index="1"><Data ss:Type="DateTime">2012-04-30T00:00:00.000</Data></Cell><Cell  ss:Index="2"><Data ss:Type="String">11:26</Data></Cell><Cell ss:StyleID="GeneralDate" ss:Index="3"><Data ss:Type="DateTime">1980-01-01T00:00:00.000</Data></Cell><Cell  ss:Index="4"><Data ss:Type="String">00:00</Data></Cell><Cell  ss:Index="5"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="6"><Data ss:Type="String">AGOSSELIN-380</Data></Cell><Cell  ss:Index="7"><Data ss:Type="String">Superuser</Data></Cell><Cell  ss:Index="8"><Data ss:Type="String">Manager</Data></Cell><Cell  ss:Index="9"><Data ss:Type="String">-11808.11:26:53.2170000</Data></Cell></Row>
</Table>
<AutoFilter x:Range="R1C1:R1C9" xmlns="urn:schemas-microsoft-com:office:excel"></AutoFilter>
</Worksheet>
</Workbook>

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 01 May 2012, 09:49 AM
Hi,

 The error you got is probably because you are not allowed to export '<data>' as a value. Would you please subscribe for the ElementExporting event of the RadGridView? When it is filed, please remove the tags '<' and '>' from the value to be exported.

All the best,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Oliver
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or