ActiveRecord import and export based on PHPExcel for Yii 2 framework.
This library is mainly designed to import data, export is in the raw condition (even it's working in basic form), under development and not documented yet.
The important notes:
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist arogachev/yii2-excel
or add
"arogachev/yii2-excel": "*"
to the require section of your composer.json
file.
if (!$importer->run()) {
echo $importer->error;
if ($importer->wrongModel) {
echo Html::errorSummary($importer->wrongModel);
}
}
Comments