title: The invocation of the constructor on type that matches the specified binding constraints threw an exception
body: <p>I'm trying to make a program that deletes columns in a DataSet that is filled by an excel file. The way it deletes columns is it compares the header in each column with the first element in each row and deletes the column of any string that does not appear in the rows. My problem is that I'm getting a weird error that I can't understand. it says:</p>
  
  <blockquote>
    <p>The invocation of the constructor on type 'Excel_Retriever.MainWindow' that matches the specified binding constraints threw an exception.' Line number '3' and line position '9'.</p>
  </blockquote>
  
  <p>I'm new to C# and XAML and would really appreciate any help with solving this error. Thank you! Here is my code:</p>
  
  <p>XAML:</p>
  
  <pre><code>&lt;Window x:Class="Excel_Retriever.MainWindow"
          xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
          xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
          Title="MainWindow" Height="350" Width="525"&gt;
      &lt;Grid Name="ExcelGrid"&gt;
          &lt;DataGrid ItemsSource="{Binding}" AutoGenerateColumns="True" Height="289"        HorizontalAlignment="Left" Margin="10,10,0,0" Name="dataGrid1" VerticalAlignment="Top" Width="481" /&gt;
      &lt;/Grid&gt;
  &lt;/Window&gt;
  </code></pre>
  
  <p>C#:</p>
  
  <pre><code>namespace Excel_Retriever
  {
      public partial class MainWindow : Window
      {
          public MainWindow()
          {
              InitializeComponent();
              DataSet excel = GetDataTableFromExcel("C:\\Users\\Sweet Lou\\Desktop\\Adjusted research info.xlsx", "Research");
              //dataGrid1.DataContext = excel.Tables[0];
              DataSet ignoreds = Ignore_Names(excel);
              dataGrid1.DataContext = ignoreds.Tables[0];
          }
  
          public DataSet GetDataTableFromExcel(string FilePath, string strTableName)
          {
              try
              {
                  OleDbConnection con = new OleDbConnection("Provider= Microsoft.ACE.OLEDB.12.0;Data Source=" + FilePath + "; Extended Properties=\"Excel 12.0;HDR=YES;\"");
                  OleDbDataAdapter da = new OleDbDataAdapter("select * from [Sheet1$]", con);
                  DataSet ds = new DataSet();
                  da.Fill(ds);
                  return ds;
              }
              catch (Exception ex)
              {
                  MessageBox.Show(ex.Message);
              }
              return null;
          }
  
          public DataSet Ignore_Names(DataSet sheet)
          {
              DataSet ignoreds = sheet;
              DataColumn columnNames = sheet.Tables[0].Columns["Name"]; //first column with names
              //ignoreds.Tables[0].Columns.Add(columnNames);
              int j = 1;
              for (int i = 0; i &lt; 15; i++) //change 15 to variable
              {
                  while (String.Compare(columnNames.Table.Rows[i].ToString(), sheet.Tables[0].Columns[j].ColumnName, true) != 0)
                  {
                      ignoreds.Tables[0].Columns.RemoveAt(j);
                      j++;
                  }
                  j++;
              }
              return ignoreds;
          }
      }
  }
  </code></pre>