PHP code example of alexain / simple-spreadsheet-reader
1. Go to this page and download the library: Download alexain/simple-spreadsheet-reader library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
alexain / simple-spreadsheet-reader example snippets
console)
[//]: # (use Alexain\SimpleSpreadsheetReaderBundle\Service\SimpleSpreadsheetReader;)
[//]: # ()
[//]: # (final class ImportService)
[//]: # ({)
[//]: # ( public function __construct()
[//]: # ( private SimpleSpreadsheetReader $reader)
[//]: # ( ) {})
[//]: # ()
[//]: # ( public function import(string $path): void)
[//]: # ( {)
[//]: # ( foreach ($this->reader->read($path) as $row) {)
[//]: # ( // $row is a normalized representation of a single record)
[//]: # ( // e.g. $row['email'], $row['created_at'], etc.)
[//]: # ( })
[//]: # ( })
[//]: # (})
[//]: # (