heyaender/excelintar-reader

Reader for Excelintar

v1.0.0 2024-01-16 18:28 UTC

This package is auto-updated.

Last update: 2024-04-25 04:19:15 UTC


README

Documentation Excelintar Reader (Import Excel)

How to install

composer require heyaender/excelintar-reader

How to use

$sheet = $excel->getSheet('Articles');
$sheet->setReadArea('B5');
foreach ($sheet->nextRow() as $rowNum => $rowData) {
    $user = User::create([
        'name' => $rowData['B'],
        'birthday' => new \Carbon($rowData['C']),
        'password' => bcrypt($rowData['D']),
    ]);
    Article::create([
        'user_id' => $user->id,
        'title' => $rowData['E'],
        'date' => new \Carbon($rowData['F']),
        'public' => $rowData['G'] === 'yes',
    ]);
}
Example Excel to Import
image