title: Specified cast is not valid with field int
body: <p>I keep getting the "Specified cast is not valid" error on my code in the ID column. I tried using </p>
  
  <pre><code>data.Columns.Add("ID", typeof(int));
  </code></pre>
  
  <p>to let it know that the ID is an int. I am getting the data from a local .xls file.</p>
  
  <p>here's my code:</p>
  
  <pre><code>  foreach (DataRow p in data.Rows)
                  {
                      TopPlayed top = new TopPlayed()
  
                      {
                          TrackID = p.Field&lt;int&gt;("ID"),
  
                          TrackName = p.Field&lt;string&gt;("Track Name"),
                          ArtistName = p.Field&lt;string&gt;("Artist Name"),
                          Times = p.Field&lt;double&gt;("NoOfPlays").ToString()
                      };
  
                      data.Columns.Add("ID", typeof(int));
  
                      daa.Add(top);
                  }
  </code></pre>
  
  <p>here's my class:</p>
  
  <pre><code> public class TopPlayed
  {
      public int TrackID { get; set; }
      public string TrackName { get; set; }
      public string ArtistName { get; set; }
      public string Times { get; set; }
  }
  </code></pre>
  
  <p>cheers in advance :)</p>