Commit 33a823a7 by Phạm Văn Đoan

test exp excel

parent e89b5371
...@@ -90,9 +90,20 @@ class NctController extends Controller ...@@ -90,9 +90,20 @@ class NctController extends Controller
// Sheet manipulation // Sheet manipulation
foreach ($tracks as $key => $val) { foreach ($tracks as $key => $val) {
$sheet->cell('A'.($key+1), function($cell) use ($val){ $sheet->cell('A'.($key+1), function($cell) use ($val){
// manipulate the cell
$cell->setValue($val['title']); $cell->setValue($val['title']);
}); });
$sheet->cell('B'.($key+1), function($cell) use ($val){
$cell->setValue($val['id_nct']);
});
$sheet->cell('C'.($key+1), function($cell) use ($val){
$cell->setValue($val['id_nct_str']);
});
$sheet->cell('D'.($key+1), function($cell) use ($val){
$cell->setValue($val['singer']);
});
$sheet->cell('E'.($key+1), function($cell) use ($val){
$cell->setValue($val['link']);
});
} }
/*$sheet->cells('A1:A5', function($cells) { /*$sheet->cells('A1:A5', function($cells) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment