Download the PHP package burhan15/office-pack without Composer

On this page you can find all versions of the php package burhan15/office-pack. 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 office-pack

Universal Office Document SDK

A first-party Office library for PHP and Node.js. Install it into your app and create spreadsheets, Word documents, PowerPoint decks, and PDFs with one API.

The files are standard OOXML (.xlsx, .docx, .pptx) and PDF, so they open in Microsoft Office, Google Sheets, Google Docs, Google Slides, and LibreOffice. This package does not wrap PhpSpreadsheet, ExcelJS, SheetJS, PHPWord, LibreOffice, or OnlyOffice.


Requirements

Runtime Version
PHP 8.1+, ext-zip, ext-dom, ext-openssl
Node.js 18+ (ESM)

Install


Spreadsheet

Calling sheet('Sales') on a new workbook names the first sheet Sales. It does not leave an empty Sheet1 behind.

Formulas

Formulas use Excel-style English (=SUM(A1:A3)). PHP and Node return the same results for:

SUM AVERAGE COUNT COUNTA MIN MAX IF IFS AND OR NOT ROUND ROUNDUP ROUNDDOWN ABS CEILING FLOOR MOD POWER SQRT CONCAT CONCATENATE LEFT RIGHT MID LEN LOWER UPPER TRIM DATE DAY MONTH YEAR TODAY NOW VLOOKUP HLOOKUP XLOOKUP INDEX MATCH SUMIF SUMIFS COUNTIF COUNTIFS AVERAGEIF AVERAGEIFS

Arithmetic (+ - * / ^) and comparisons (= <> < > <= >=) work too. Any other function evaluates to #NAME?.

VLOOKUP and HLOOKUP take a range and a FALSE argument for an exact match:

Spreadsheet API

Action PHP Node
Create Office::excel()->create() Office.excel().create()
Open Office::excel()->open($path) await Office.excel().open(path)
Sheet $wb->sheet('Sales') wb.sheet('Sales')
Value $sheet->setCell('A1', 'Hi') sheet.setCell('A1', 'Hi')
Formula $sheet->setFormula('B1', '=A1*2') sheet.setFormula('B1', '=A1*2')
Many rows $sheet->fromRows($rows) sheet.fromRows(rows)
Skip calc on save $wb->calculateOnSave = false Office.excel({ calculateOnSave: false })
Recalculate $wb->calculate() wb.calculate()
Save $wb->save('out.xlsx') await wb.save('out.xlsx')
HTTP bytes echo $wb->toString() wb.toBuffer()
CSV text Office::csvFromRows($rows) Office.csvFromRows(rows)
Large file — await wb.streamToFile(path)

withPassword() stores an SDK envelope (AES-256-GCM). PHP and Node can open that file with the same password. Excel’s own password format is not supported.


Word

PowerPoint

In PHP, the first addText() on a slide is the title.

PDF

enableTaggedPdf() writes a page tree with MarkInfo and a language tag. Merge, split, and text redaction are on the PDF object. This is not a veraPDF-certified PDF/UA suite.


HTTP download


Verify

From a clone of this repository:

CLI, after npm install @burhan15/office-pack:


Documentation

Topic Doc
Integrator guide docs/guides/integration.md
Excel and Google compatibility docs/guides/ms-google-compatibility.md
Feature matrix docs/research/feature-matrix.md
Architecture docs/architecture/system-architecture.md
Security SECURITY.md

License

Apache-2.0. See LICENSE.


All versions of office-pack with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-zip Version *
ext-dom Version *
ext-openssl Version *
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 burhan15/office-pack contains the following files

Loading the files please wait ...