$this->loadexcel();//半酣phpexcel文件
$_readexcel = new phpexcel_reader_excel2007();
if(!$_readexcel->canread('link.xls')){
$_readexcel = new phpexcel_reader_excel5();
}
$_phpexcel = $_readexcel->load('link.xls');
$sheetcount = $_phpexcel->getsheetcount();
$newexcel = array();
$exceldata = array();
for($s = 0;$s $currentsheet = $_phpexcel->getsheet($s);
$allcolumn = $currentsheet->gethighestcolumn();
$allrow = $currentsheet->gethighestrow();
for($r = 1;$r
for($currentcolumn='a';$currentcolumn $address = $currentcolumn.$r;
$newexcel[] = $currentsheet->getcell($address)->getvalue();
}
}
}
后面就是对数组的操作了--不过要先下载好phpexcel,并包含进来
