fuwa/xlsx-read

0.0.7 2020-07-22 02:09 UTC

This package is auto-updated.

Last update: 2024-03-22 10:55:35 UTC


README

###Simply read large files

$oXLSXRead = new \Fuwa\XLSXRead();
$oCallback = function ($_v, $row, $con) {
    if ($row < 6)
        return 'continue';
    if (empty($_v['id']))
        return [false, 'Number cannot be empty!'];
};
$aConfig = ['path'      => $this->getTempCacheDir() . 'csv/sf.xlsx',
            'aKey'      => ['id' => 'Serial number', 'comtime' => 'Completion time',],
            'format'    => ['comtime' => 'time'],
            'aSheet'    => ['progress'],
            'callback'  => $oCallback,
            'titleRows' => 2,];
$flag = $oXLSXRead->read($aConfig);
if (false === $flag){
    $oXLSXRead->getMessage();
}