title: Export ASPxGridView to xlsx using ASPxGridViewExporter with formatted text
body: <p>I have an <code>ASPxGridView</code> having a number of columns (of type <code>GridViewDataComboBoxColumn</code> or <code>GridViewDataHyperLinkColumn</code>). In the code behind in the grid's <code>CustomColumnDisplayText</code> event I format the text of the cells in the following way:</p>
  
  <pre><code>protected void MyGrid_CustomColumnDisplayText(object sender, DevExpress.Web.ASPxGridView.ASPxGridViewColumnDisplayTextEventArgs e)
  {
      if (e.Column is DevExpress.Web.ASPxGridView.GridViewDataColumn)
      {
          switch (e.Column.FieldName)
          {
              case "Energy":
                  if (e.Value is float)
                  {
                      // the FormatEnergy method here returns for example "323.32 kWh"
                      e.DisplayText = DataDisplayTools.Instance.FormatEnergy((float)e.Value);
                  }
                  break;
  
                  // other cases
  
          }
      }
  }
  </code></pre>
  
  <p>For exporting the grid view in <em>.xlsx</em> format I use an <code>ASPxGridViewExporter</code>:</p>
  
  <pre><code>protected void lnkXlsxExport_Click(object sender, EventArgs e)
  {
      try
      {
          gridViewExporter.DataBind();
          gridViewExporter.WriteXlsxToResponse();
      }
      catch (Exception e1)
      {
          //
      }
  }
  </code></pre>
  
  <p>My problem is that when I export the grid view to <em>.xlsx</em>, the values of the columns in the exported file are not formatted as they are in the grid view.
  For example the values in the grid view (they are formatted in the <code>CustomColumnDisplayText</code> event) are</p>
  
  <ul>
  <li>32,332 kWh</li>
  <li>311 kWh</li>
  <li>2,254 kWh</li>
  </ul>
  
  <p>but these values in the <em>xlsx</em> file after exporting appear like</p>
  
  <ul>
  <li>32332</li>
  <li>311</li>
  <li>2254</li>
  </ul>
  
  <p><img src="https://i.stack.imgur.com/JWuxK.png" alt="enter image description here"></p>
  
  <p>My question is: Can export an <code>ASPxGridView</code> to an excel file having exactly the same texts in the excel file's cells as the grid view has, using an <code>ASPxGridViewExporter</code>?</p>