Download the PHP package kherge/excel without Composer

On this page you can find all versions of the php package kherge/excel. 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?

Informations about the package excel

Build Status [Packagist]() [Packagist Pre Release]()

Excel

Reads very large Excel (.xlsx) workbook files.

Usage

Performance

Metrics are TBD.

All I know for sure is that this library will read any size spreadsheet while using less than 2 MiB of RAM. The process of reading the spreadsheet is very CPU intensive, however.

Requirements

Installation

composer require kherge/excel

Documentation

There are only two classes you use directly.

Workbook

The KHerGe\Excel\Workbook class provides access to the worksheets in a workbook.

You instantiate the class by providing it the path of the workbook file as its only argument.

Method Signature Description
countWorksheets () -> int Counts the number of worksheets in the workbook.
hasWorksheetByIndex (int) -> bool Checks if a worksheet with a given index exists in the workbook.
hasWorksheetByName (str) -> bool Checks if a worksheet with a given name exists in the workbook.
getWorksheetByIndex (int) -> Worksheet Retrieves a worksheet by its index.
getWorksheetByName (str) -> Worksheet Retrieves a worksheet by its name.
iterateWorksheets () -> yield<int, Worksheet> Yields each worksheet in the workbook. The key is the index of the worksheet and the value is the Worksheet instance.
listWorksheets () -> map<int, str> Gets a list of worksheets in the workbook. The key is the index of the worksheet and the value is the name.

Worksheet

The KHerGe\Excel\Worksheet class provides access to the contents of an individual worksheet in the workbook. Instances of this class are only returned by the Workbook class using one of the getWorksheet* methods.

Method Signature Description
countColumns () -> int Counts the number of columns in the worksheet.
countRows () -> int Counts the number of rows in the worksheet.
getCell (str, int) -> mixed Gets the value for a specific cell. The first argument is the name of the column and the second is the number of the row.
getIndex () -> int Gets the index of the worksheet.
getName () -> str Gets the name of the worksheet.
getRow (int) -> array<mixed> Gets all of the values for a specific row. Its only argument is the number of the row.
hasCell (str, int) -> bool Checks if a specific cell exists in the worksheet. The first argument is the name of the column and the second is the number of the row.
hasColumn (str) -> bool Checks if a column exists in the worksheet. Its only argument is the name of the column.
hasRow (int) -> bool Checks if a row exists in the worksheet. Its only argument is the number of the row.
iterateColumn (str) -> yield<int, mixed> Yields each value in a specific column. Its only argument is the name of the column. The key is the number of the row and the value is the value of the cell.
iterateRows () -> yield<int, map<str, mixed>> Yields each row in the worksheet. The key is the number of the row and the value is array of the value in each column.

License

This library is released under the MIT and Apache 2.0 licenses.


All versions of excel with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
ext-pdo_sqlite Version *
ext-zip Version *
kherge/file-manager Version ^2.6
kherge/xml Version ^1.1
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 kherge/excel contains the following files

Loading the files please wait ....