Fork me on GitHub

Features

  • Create an in-memory spreadsheet representation
  • Set spreadsheet meta data (author, title, description, ...)
  • Add worksheets to spreadsheet
  • Add data and formulas to individual cells
  • Merge cells
  • Protect ranges of cells with a password
  • Supports setting cell width and height
  • Supports different fonts and font styles
  • Supports formatting, styles, cell borders, fills, gradients, ...
  • Supports hyperlinks
  • Supports different data types for individual cells
  • Supports cell text wrapping
  • Supports conditional formatting
  • Supports column auto-sizing
  • Supports rich-text strings
  • Supports autofilter
  • Supports "freezing" cell panes
  • Supports cell-level security
  • Supports workbook-level security
  • Supports worksheet-level protection
  • Group rows/columns
  • Cell data validation
  • Insert/remove rows/columns
  • Named ranges
  • Worksheet references
  • Calculate formula values
  • Add comments to a cell
  • Add images to your spreadsheet
  • Set image styles :
    • Positioning
    • Rotation
    • Shadow
  • Set printing options :
    • Header
    • Footer
    • Page margins
    • Paper size
    • Orientation
    • Row and column breaks
    • Repeat rows at header / columns at left
    • Print area
  • ... and lots of other things!

File Formats supported

Reading

  • BIFF 5-8 (.xls) Excel 95 and above
  • Office Open XML (.xlsx) Excel 2007 and above
  • SpreadsheetML (.xml) Excel 2003
  • Open Document Format/OASIS (.ods)
  • Gnumeric
  • HTML
  • SYLK
  • CSV

Writing

  • BIFF 8 (.xls) Excel 95 and above
  • Office Open XML (.xlsx) Excel 2007 and above
  • HTML
  • CSV
  • PDF (using either the tcPDF, DomPDF or mPDF libraries, which need to be installed separately)