Open Document Spreadsheet (.ods) generator

v0.0.3 2016-04-14 21:51 UTC

This package is not auto-updated.

Last update: 2024-04-10 22:05:37 UTC


odsPhpGenerator is a library written in PHP to generate Open Document Spreadsheet (.ods)

Avatars in trending repos


  • UTF-8 Encoding
  • Multi tables
  • Merge Cells
  • Formula
  • Images
  • And more


By composer :

$ composer require lapinator/ods-php-generator


use odsPhpGenerator\ods;
use odsPhpGenerator\odsTable;
use odsPhpGenerator\odsTableRow;
use odsPhpGenerator\odsTableCellString;

// Load library
require_once '../vendor/autoload.php';

// Create Ods object
$ods  = new ods();

// Create table named 'table 1'
$table = new odsTable('table 1');

// Create the first row
$row   = new odsTableRow();

// Create and add 2 cell 'Hello' and 'World'
$row->addCell( new odsTableCellString("Hello") );
$row->addCell( new odsTableCellString("World") );

// Attach row to table

// Attach talble to ods

// Download the file

More examples in directory examles