title: DevExpress export GridView to Excel
body: <p>I really need help with this.. I can't find any example on the internet
  I am using DevExpress GridView I need to send it to excel and I'm getting problems to loop to every cell and column because DevExpress contains different methods then the DataGridView</p>
  
  <p>that's the code that i'm trying to write.. I really Appreciate your help</p>
  
  <pre><code>    public class Form1 : System.Windows.Forms.Form
      {
      Microsoft.Office.Interop.Excel.ApplicationClass ExcelApp = new Microsoft.Office.Interop.Excel.ApplicationClass();
  
      string FirstName = "First Name";
      string FatherName = "Father Name";
      string LastName = "Last Name";
      }
      public Form1()
      {
          ExcelApp.Application.Workbooks.Add(Type.Missing);
          ExcelApp.Columns.ColumnWidth = 20;
          //
          // Required for Windows Form Designer support
          //
          InitializeComponent();
  
          //
          // TODO: Add any constructor code after InitializeComponent call
          //
      }
      private void simpleButton1_Click(object sender, System.EventArgs e)
      {
          try
          {
              OleDbConnection con = new OleDbConnection();
              con.ConnectionString = "Provider=Microsoft.Ace.OLEDB.12.0;Data Source=C:\\Users\\pc\\Documents\\Emp.xlsx;Extended Properties=\"Excel 12.0;HDR=Yes\"";
  
              con.Open();
              DataTable dtSchema;
              dtSchema = con.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, new object[] { null, null, null, "TABLE" });
              OleDbCommand Command = new OleDbCommand ("select * FROM [" + dtSchema.Rows[0]["TABLE_NAME"].ToString() + "]", con);
              OleDbDataAdapter da = new OleDbDataAdapter(Command);
              DataSet ds = new DataSet ();
              da.Fill(ds);
              dataGrid1.DataSource = ds.Tables[0];
          }
          catch (Exception ex)
          {
              MessageBox.Show(ex.Message);
          }
  
      private void ExportBtn_Click(object sender, System.EventArgs e)
      {
          for (int i = 1; i &lt; gridView3.Columns.Count + 1; i++)
          {
              //ExcelApp.Cells[1, i] = gridView3.Columns[i].HeaderStyleName;
  
          }
          for (int i = 0; i&lt; gridView3.RowCount - 1; i++)
          {
              for (int j = 0; j &lt; gridView3.Columns.Count; j++)
              {
                  ExcelApp.Cells[i + 2, j + 1] = gridView3.Columns[j].ToString();
              }
          }
          ExcelApp.ActiveWorkbook.SaveCopyAs("C:\\Users\\pc\\Emp.xlsx");
          ExcelApp.ActiveWorkbook.Saved = true;
          ExcelApp.Quit();
      }
  </code></pre>
  
  <p>My problem is in the Export button the click event.. There's no such thing as Row()</p>