2017 © Pedro Peláez
 

library catdoc-xls

PHP wrapper on catdoc util - xls files parser

image

caseycs/catdoc-xls

PHP wrapper on catdoc util - xls files parser

  • Monday, March 14, 2016
  • by caseycs
  • Repository
  • 1 Watchers
  • 2 Stars
  • 419 Installations
  • Python
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 3 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

catdoc_xls

Build Status, (*1)

Excel files to PHP array convertor (xls/xlsx), wrapper on catdoc, xls2csv (with few modifications) and xlsx2csv., (*2)

Dependencies should be already install: xlsx2csv can be installed via pip, catdoc is available by apt-get., (*3)

Usage example:

$Parser = new \CatDocXls\Parser;
$result = $Parser->xls('path/to/file.xls');
print_r($result);

//some xsl files are not parsed via xls2csv binary correct, so you can try python script
$Parser = new \CatDocXls\Parser;
$result = $Parser->xls2('path/to/file.xls', 0);
print_r($result);

$Parser = new \CatDocXls\Parser;
$result = $Parser->xlsx('path/to/file.xlsx');
print_r($result);

See more examples in ParserTest.php, (*4)

Known issues

  • Empty lines are ignored - this is hardcoded in xls2csv, and --ignoreempty is always passed to xlsx2csv
  • Empty sheets are also ignored
  • Xls2cvs always output date and datetime fields as days count, so is is passed as is - you should convert them manually, see http://www.linuxquestions.org/questions/red-hat-31/xls2csv-doesn-t-work-with-excel-date-format-703348/

The Versions

14/03 2016

dev-master

9999999-dev

PHP wrapper on catdoc util - xls files parser

  Sources   Download

MIT

The Requires

  • php >=5.3.0

 

The Development Requires

parser excel xls