mardi 31 janvier 2017

Laravel-Excel Macro support

I've got a simple question, does Laravel-Excel has Macro support? I want to get data from my sheet into my database. But it seems like the package can't handle macro's. My code below:

\Excel::selectSheets('Uitslagen_Site')->load($storagePath, function($reader) {
        foreach ($reader->toArray() as $row) {
            // Insert into database
        }
    });

But this is my output if I var_dump $row:

Array ( [ronde] => 0 [tijd] => [poule] => 0 [team1] => 0 [team2] => 0 [scheidsrechter] => 0 [uitslagen] => 0-0 | 0-0 [dag] => Zondag [dagdeel] => Zondagochtend [set_1] => 0-0 [set_2] => 0-0 [totaal] => 0-0 )

This needs to be the output (just an example):

Array ( [ronde] => 1 [tijd] => 9:00 [poule] => A [team1] => Team 1 [team2] => Team 2 [scheidsrechter] => Team 3 [uitslagen] => 20-25 | 20-25 [dag] => Zondag [dagdeel] => Zondagochtend [set_1] => 20-25 [set_2] => 20-25 [totaal] => 20-25 )

Anybody know a solution for this?

Thanks in advance.



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire