title: PHPExcel How to get from Column A row values
body: <p>I am new in PHPExcel and I need help.
  How I can get from Excel file in Column A all rows values and put it in array or variables.</p>
  
  <p><a href="https://i.stack.imgur.com/clBRP.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/clBRP.png" alt="excel example"></a></p>
  
  <p>This is a case: 
  I have in column 'A' list of IP address and I need put it in Variable or Array which will be sent on API to get data of IP, like city, zip, state.. When user uploads excel file with IP, then it must be sent to API and get a response from API and insert it in Columns.</p>
  
  <p>Can somebody help me here how to get values from Column 'A' in array or variables?
  Here is my code:</p>
  
  <pre><code>&lt;?php    
  if(isset($_POST['Submit'])){ //check if form was submitted
  
  $target_dir = 'uploads/';
  $target_file = $target_dir . basename($_FILES["filepath"]["name"]);
  $imageFileType = pathinfo($target_file,PATHINFO_EXTENSION);
  
  move_uploaded_file($_FILES["filepath"]["tmp_name"], $target_file);
  
  }
  //get details from api
  $ip = ''; 
  function ip_details($ip)
      {
      $json = file_get_contents("http://ipinfo.io/{$ip}");
      $details = json_decode($json);
      return $details;
      }
  
  $details = ip_details($ip);
  
  
  //include PHPExcel libary
  require_once dirname(__FILE__) . '/Classes/PHPExcel/IOFactory.php';
  
  $inputFileType = PHPExcel_IOFactory::identify($target_file);
  $objReader = PHPExcel_IOFactory::createReader($inputFileType);
  $objPHPExcel = $objReader-&gt;load($target_file);
  
  // Set active sheet index to the first sheet, so Excel opens this as the first sheet
  $objPHPExcel-&gt;setActiveSheetIndex(0);
  
  // Add column headers
  $objPHPExcel-&gt;getActiveSheet()
              -&gt;setCellValue('A1', 'IP Adresses')
              -&gt;setCellValue('B1', 'City')
              -&gt;setCellValue('C1', "State")
              -&gt;setCellValue('D1', "Zip")
              ;
  
                  // here I need read each row of Column 'A' and here I am stuck
                  $sheet = $objPHPExcel-&gt;getSheet(0);
                  $highestRow = $sheet-&gt;getHighestRow();
                  $highestColumn = $sheet-&gt;getHighestColumn();
  
  
  
  
  $objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
  $objWriter-&gt;save($target_file);
  
  ?&gt;
  </code></pre>