Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
Generated on May 8, 2024 via composer

phpoffice/phpspreadsheet 1.10.0

PHPSpreadsheet - Read, Create and Write Spreadsheet documents in PHP - Spreadsheet engine
Package summary
Share
2
issues
2
high severity
vulnerability
2
1
license
4
MIT
Package created
8 Dec 2016
Version published
18 Nov 2019
Maintainers
3
Total deps
4
Direct deps
3
License
MIT

Issues

2

2 high severity issues

high
via: phpoffice/phpspreadsheet@1.10.0
via: phpoffice/phpspreadsheet@1.10.0
Collapse
Expand

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
4 Packages, Including:
markbaker/complex@1.5.0
markbaker/matrix@1.2.3
phpoffice/phpspreadsheet@1.10.0
psr/simple-cache@1.0.1
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

3
All Dependencies CSV
β“˜ This is a list of phpoffice/phpspreadsheet 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
markbaker/complex1.5.0-MIT
prod
markbaker/matrix1.2.3-MIT
prod
psr/simple-cache1.0.14.44 kBMIT
prod

Visualizations

Frequently Asked Questions

What does phpoffice/phpspreadsheet do?

PhpSpreadsheet, powered by the PHP Office team, is a robust library written exclusively in PHP. It provides a set of classes that make reading, writing, and working with spreadsheet files (think Excel, LibreOffice Calc etc.) quite seamless. PhpSpreadsheet allows for data extraction from these files as well as data entry, all in a couple of lines of code, making it incredibly versatile and useful for numerous applications.

How do you use phpoffice/phpspreadsheet?

Using PhpSpreadsheet package is straightforward with PHP's Composer. To use PhpSpreadsheet in your project, you begin by installing it with composer via the command: composer require phpoffice/phpspreadsheet. Once installed, you can then use it to carry out various spreadsheet related tasks.

For instance, to write data to a spreadsheet, use the following code:

use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;

$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
$sheet->setCellValue('A1', 'Hello');
$sheet->setCellValue('B1', 'World !');

$writer = new Xlsx($spreadsheet);
$writer->save('hello_world.xlsx');

This will create a new xlsx file named hello_world.xlsx with the cell A1 containing the text Hello and cell B1 containing World !.

If you're trying to read data from an existing spreadsheet, PhpSpreadsheet provides the IOFactory class to facilitate this process. For example:

use PhpOffice\PhpSpreadsheet\IOFactory;

$spreadsheet = IOFactory::load('Sample.xlsx');
$worksheet = $spreadsheet->getActiveSheet();
$cellData = $worksheet->getCell('A1')->getValue();

echo $cellData;

In this code, we're loading a spreadsheet file by the name Sample.xlsx and retrieving the value stored in cell A1. The value is then printed to the console.

Where are the phpoffice/phpspreadsheet docs?

Detailed information on the workings, installation and other functionality of PhpSpreadsheet can be found on the official documentation page at https://phpspreadsheet.readthedocs.io. The API documentation can be found at https://phpoffice.github.io/PhpSpreadsheet, providing an overview of the classes, functions, constants, and methods employed by the PhpSpreadsheet package.