How do I populate my dataTable in the mue method import and grab the index
from the correct line from my initated file from line 6? Here's my code:
 
  1. protected void Page_Load (object sender, EventArgs, and)  
  2.   
  3.  {  
  4.      
  5.  }  
  6.   
  7.    
  8.   
  9.   protected void import_Click (object sender, EventArgs and)  
  10.   
  11.         {  
  12.            
  13.            
  14.            DataTable Data = new DataTable ();  
  15.   
  16. if (selectFileContent! = null)  
  17.   
  18.                     {  
  19.   
  20.                         string Excel = AppDomain.CurrentDomain.BaseDirectory + select File.FileName;  
  21.   
  22.                         select File.SaveAs (Excel);  
  23.   
  24.                         Data = Excel Data (Excel);  
  25.   
  26.    
  27.   
  28.                         var recordsValid = ((DataTable) Data) .Rows.OfType  (). Skip (5);  
  29.   
  30.                         // Delete the last line  
  31.   
  32.                         recordsValid = RecordsValid.Take (RecordsValid.Count () - 1);  
  33.   
  34.                         // read 100 out of 100 records  
  35.   
  36. int amount_for_page = 100;  
  37.   
  38.                         int total_of_page;  
  39.   
  40.                         // Count valid records  
  41.   
  42.                         int qtd_total_registers = recordsValids.Count ();  
  43.   
  44.                         // Perform mathematical calculations for total pages.  
  45.   
  46.                         total_of_pages = (int) Math.Ceiling ((double) qtd_total_records / amount_by_page);  
  47.   
  48.                         if (recordsValid.Count ()> 0)  
  49.   
  50.                         {  
  51.   
  52.                             bool layoutValid = CheckLayout (Data);  
  53.   
  54.   
  55.   
  56. if (! layoutValid)  
  57.   
  58.                                 ClientScript.RegisterStartupScript (typeof (string), "Error""