natilosir/excel

A PHP library to work with Excel files using PhpSpreadsheet.

Installs: 3

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/natilosir/excel

1.0.0 2024-12-18 20:30 UTC

This package is auto-updated.

Last update: 2025-11-21 01:17:44 UTC


README

A simple PHP utility for working with Excel files using PhpSpreadsheet.

use Natilosir\Excel\Excel;

Example 1: Create Excel file from array

$data = [
    ["Name", "Age", "Salary"],
    ["John Doe", 28, 5000],
    ["Jane Smith", 34, 7000],
    ["Mark Taylor", 45, 9000],
];
Excel::ToExcel($data, "example.xlsx");

Example 2: Convert Excel file to array

    $arrayFromExcel = Excel::ToArray("example.xlsx");
    print_r($arrayFromExcel);