sergiors/importing

Import your xls, xlt, xlsx, cvs files easily

1.0.1 2016-01-28 03:18 UTC

This package is not auto-updated.

Last update: 2024-12-07 19:55:26 UTC


README

Build Status

Import your xls, xlt, xlsx, xlsm, xltx, xltm, cvs (uff) files easily.

Install

composer require sergiors/importing

How to use

use Symfony\Component\Config\Loader\LoaderResolver;
use Symfony\Component\Config\Loader\DelegatingLoader;
use Symfony\Component\Config\FileLocator;

$loaders = [
    new Excel2007FileLoader(new FileLocator()),
    new Excel5FileLoader(new FileLocator()),
    new CsvFileLoader(new FileLocator())
];

$resolver = new LoaderResolver($loaders);
$loader = new DelegatingLoader($resolver);

$data = $loader->load('your_file.xls'); // return an array
// print_r($data);

Be Happy!

License

MIT