Download the PHP package avadim/fast-excel-reader without Composer

On this page you can find all versions of the php package avadim/fast-excel-reader. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?
avadim/fast-excel-reader
Rate from 1 - 5
Rated 5.00 based on 1 reviews

Informations about the package fast-excel-reader

Latest Stable Version Total Downloads License PHP Version Require

FastExcelReader

FastExcelReader is a part of the FastExcelPhp Project which consists of

Introduction

This library is designed to be lightweight, super-fast and requires minimal memory usage.

FastExcelReader can read Excel compatible spreadsheets in XLSX format (Office 2007+). It only reads data, but it does it very quickly and with minimal memory usage.

Features

Installation

Use composer to install FastExcelReader into your project:

Jump to:

Usage

You can find more examples in /demo folder

Simple example

You will get this array:

You will get this array:

You will get this array:

Read values row by row in loop

Alternative way to read row by row

Keys in resulting arrays

You will get this result:

The optional second argument specifies the result array keys

You will get this result:

Allowed values of result mode

mode options descriptions
KEYS_ORIGINAL rows from '1', columns from 'A' (default)
KEYS_ROW_ZERO_BASED rows from 0
KEYS_COL_ZERO_BASED columns from 0
KEYS_ZERO_BASED rows from 0, columns from 0 (same as KEYS_ROW_ZERO_BASED + KEYS_COL_ZERO_BASED)
KEYS_ROW_ONE_BASED rows from 1
KEYS_COL_ONE_BASED columns from 1
KEYS_ONE_BASED rows from 1, columns from 1 (same as KEYS_ROW_ONE_BASED + KEYS_COL_ONE_BASED)

Additional options that can be combined with result modes

options descriptions
KEYS_FIRST_ROW the same as true in the first argument
KEYS_RELATIVE index from top left cell of area (not sheet)
KEYS_SWAP swap rows and columns

For example

You will get this result:

Advanced example

You can set read area by defined names in workbook. For example if workbook has defined name Headers with range Demo1!$B$4:$D$4 then you can read cells by this name

Note that since the value contains the sheet name, this sheet becomes the default sheet.

You can set read area in the sheet

But if you try to use this name on another sheet, you will get an error

If necessary, you can fully control the reading process using the method with callback-function

Date Formatter

By default, all datetime values returns as timestamp. But you can change this behavior using

Images functions

Cell value types

The library tries to determine the types of cell values, and in most cases it does it right. Therefore, you get numeric or string values. Date values are returned as a timestamp by default. But you can change this behavior by setting the date format (see the formatting options for the date() php function).

The above example will output:

The above example will output:

How to get complete info about the cell style

Usually read functions return just cell values, but you can read the values with styles. In this case, for each cell, not a scalar value will be returned, but an array like ['v' => _scalarvalue, 's' => _stylearray, 'f' => formula]

Or you can read styles only (without values)

But we do not recommend using these methods with large files

Some useful methods

Excel object

Sheet object

Do you want to support FastExcelReader?

if you find this package useful you can give me a star on GitHub.

Or you can donate me :)


All versions of fast-excel-reader with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
ext-zip Version *
ext-mbstring Version *
ext-ctype Version *
ext-xmlreader Version *
ext-intl Version *
avadim/fast-excel-helper Version ^1.0.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package avadim/fast-excel-reader contains the following files

Loading the files please wait ....