我已经用Laravel Excel.xls
加载了文件:
Excel::load('public/files/20160621.xls', function($reader) {
// read a cell value
});
如何读取加载的 excel 文件的单元格值?这部分的文档似乎不清楚。
我已经用Laravel Excel.xls
加载了文件:
Excel::load('public/files/20160621.xls', function($reader) {
// read a cell value
});
如何读取加载的 excel 文件的单元格值?这部分的文档似乎不清楚。
public function get()
{
$excelFile ...
return Excel::load($excelFile, function($doc) {
$sheet = $doc->getSheetByName('data'); // sheet with name data, but you can also use sheet indexes.
$sheet->getCell('A1');
$sheet->getCellByColumnAndRow(0,0);
});
}
没错,阅读某些单元格的文档尚不清楚。希望这会帮助你。
供阅读使用
public function reader($file)
{
$excel=Excel::load($file, function($reader) {
$reader->...//Document propities
$sheet = $doc->getSheet(0); // sheet with index
$cell=$sheet->getCell('A1')->getValue();
})->toArray()//get();
...
$cell=$excel->index//[row][col] Get formatted type(date,currency,calculated) cells
...
}