Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

phpexcel rangetoarray date format

$get_excel_data = $objPHPExcel->getActiveSheet()->rangeToArray("A1:".$highestColumn.$highestRow);           
$i = 1; 
foreach($get_excel_data as $val) {
    //In my case, 2nd column is a date so that I format using 
    $date = date('Y-m-d',PHPExcel_Shared_Date::ExcelToPHP($objWorksheet->getCellByColumnAndRow(1, $i)->getValue()));  // array index 1              
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #phpexcel #rangetoarray #date #format
ADD COMMENT
Topic
Name
3+6 =