Keine Beschreibung

Janson Leung 166abc32c4 Update vor 10 Jahren
PHPExcelReader 166abc32c4 Update vor 10 Jahren
README.md 166abc32c4 Update vor 10 Jahren
demo.php 5b9b9df4ad Update demo.php vor 10 Jahren
test.xls 464b9162a3 update vor 10 Jahren

README.md

PHPExcelReader is a lightweight Excel file reading class, support the CSV, XLS, XLSX file. It can read line by line as needed.

Requirements:

Usage:

All data is read from the file sequentially, with each row being returned as a numeric array. This is about the easiest way to read a file:

<?php
    require 'PHPExcelReader/PHPExcelReader.php';

    try{
        $Reader = new PHPExcelReader('test.xls');
        $total = $Reader->count();          // get the total rows of records
        //$current = $Reader->current();    // get the current row data

        /*
        $Reader->seek(4);                   // skip to the 4th row 
        $row = $Reader->current();          // get the 4th row data
        */

        /*
        foreach($Reader as $key => $row){
            $data[] = $row;                 // loop obtain row data
        }
        */

        var_dump($total);
    } catch (Exception $e) {
        die($e->getMessage());
    }