All Projects → mk-j → Php_xlsxwriter

mk-j / Php_xlsxwriter

Licence: mit
Lightwight XLSX Excel Spreadsheet Writer in PHP

Labels

Projects that are alternatives of or similar to Php xlsxwriter

Luckysheet
Luckysheet is an online spreadsheet like excel that is powerful, simple to configure, and completely open source.
Stars: ✭ 9,772 (+610.17%)
Mutual labels:  excel, xlsx
Excelcy
Excel Integration with spaCy. Training NER using Excel/XLSX from PDF, DOCX, PPT, PNG or JPG.
Stars: ✭ 89 (-93.53%)
Mutual labels:  excel, xlsx
Desktopeditors
An office suite that combines text, spreadsheet and presentation editors allowing to create, view and edit local documents
Stars: ✭ 1,008 (-26.74%)
Mutual labels:  excel, xlsx
Js2excel
😌 😃 👿 A simple module for excel and json converts each other, which works in the browser.
Stars: ✭ 83 (-93.97%)
Mutual labels:  excel, xlsx
Excel Io
Object-oriented java Excel library
Stars: ✭ 76 (-94.48%)
Mutual labels:  excel, xlsx
Pyexcel
Single API for reading, manipulating and writing data in csv, ods, xls, xlsx and xlsm files
Stars: ✭ 902 (-34.45%)
Mutual labels:  excel, xlsx
Documentbuilder
ONLYOFFICE Document Builder is powerful text, spreadsheet, presentation and PDF generating tool
Stars: ✭ 61 (-95.57%)
Mutual labels:  excel, xlsx
Sheetjs
📗 SheetJS Community Edition -- Spreadsheet Data Toolkit
Stars: ✭ 28,479 (+1969.69%)
Mutual labels:  excel, xlsx
Myexcel
MyExcel, a new way to operate excel!
Stars: ✭ 1,198 (-12.94%)
Mutual labels:  excel, xlsx
Fast Excel
🦉 Fast Excel import/export for Laravel
Stars: ✭ 1,183 (-14.03%)
Mutual labels:  excel, xlsx
Tabtoy
高性能表格数据导出器
Stars: ✭ 1,302 (-5.38%)
Mutual labels:  excel, xlsx
Dbwebapi
(Migrated from CodePlex) DbWebApi is a .Net library that implement an entirely generic Web API (RESTful) for HTTP clients to call database (Oracle & SQL Server) stored procedures or functions in a managed way out-of-the-box without any configuration or coding.
Stars: ✭ 84 (-93.9%)
Mutual labels:  excel, xlsx
Tableexport
The simple, easy-to-implement library to export HTML tables to xlsx, xls, csv, and txt files.
Stars: ✭ 781 (-43.24%)
Mutual labels:  excel, xlsx
Xlnt
📊 Cross-platform user-friendly xlsx library for C++11+
Stars: ✭ 876 (-36.34%)
Mutual labels:  excel, xlsx
Rows
A common, beautiful interface to tabular data, no matter the format
Stars: ✭ 739 (-46.29%)
Mutual labels:  excel, xlsx
Openvasreporting
OpenVAS Reporting: Convert OpenVAS XML report files to reports
Stars: ✭ 42 (-96.95%)
Mutual labels:  excel, xlsx
Readxl
Read excel files (.xls and .xlsx) into R 🖇
Stars: ✭ 585 (-57.49%)
Mutual labels:  excel, xlsx
Xlsx Populate
Excel XLSX parser/generator written in JavaScript with Node.js and browser support, jQuery/d3-style method chaining, encryption, and a focus on keeping existing workbook features and styles in tact.
Stars: ✭ 668 (-51.45%)
Mutual labels:  excel, xlsx
Excelize
Golang library for reading and writing Microsoft Excel™ (XLSX) files.
Stars: ✭ 10,286 (+647.53%)
Mutual labels:  excel, xlsx
Bookfx
Composing Excel spreadsheets based on a tree of nested components like the HTML DOM.
Stars: ✭ 102 (-92.59%)
Mutual labels:  excel, xlsx

PHP_XLSXWriter

This library is designed to be lightweight, and have minimal memory usage.

It is designed to output an Excel compatible spreadsheet in (Office 2007+) xlsx format, with just basic features supported:

  • supports PHP 5.2.1+
  • takes UTF-8 encoded input
  • multiple worksheets
  • supports currency/date/numeric cell formatting, simple formulas
  • supports basic cell styling
  • supports writing huge 100K+ row spreadsheets

Never run out of memory with PHPExcel again.

Simple PHP CLI example:

$data = array(
    array('year','month','amount'),
    array('2003','1','220'),
    array('2003','2','153.5'),
);

$writer = new XLSXWriter();
$writer->writeSheet($data);
$writer->writeToFile('output.xlsx');

Simple/Advanced Cell Formats:

$header = array(
  'created'=>'date',
  'product_id'=>'integer',
  'quantity'=>'#,##0',
  'amount'=>'price',
  'description'=>'string',
  'tax'=>'[$$-1009]#,##0.00;[RED]-[$$-1009]#,##0.00',
);
$data = array(
    array('2015-01-01',873,1,'44.00','misc','=D2*0.05'),
    array('2015-01-12',324,2,'88.00','none','=D3*0.05'),
);

$writer = new XLSXWriter();
$writer->writeSheetHeader('Sheet1', $header );
foreach($data as $row)
	$writer->writeSheetRow('Sheet1', $row );
$writer->writeToFile('example.xlsx');

50000 rows: (1.4s, 0MB memory usage)

include_once("xlsxwriter.class.php");
$writer = new XLSXWriter();
$writer->writeSheetHeader('Sheet1', array('c1'=>'integer','c2'=>'integer','c3'=>'integer','c4'=>'integer') );
for($i=0; $i<50000; $i++)
{
    $writer->writeSheetRow('Sheet1', array($i, $i+1, $i+2, $i+3) );
}
$writer->writeToFile('huge.xlsx');
echo '#'.floor((memory_get_peak_usage())/1024/1024)."MB"."\n";
rows time memory
50000 1.4s 0MB
100000 2.7s 0MB
150000 4.1s 0MB
200000 5.7s 0MB
250000 7.0s 0MB

Simple cell formats map to more advanced cell formats

simple formats format code
string @
integer 0
date YYYY-MM-DD
datetime YYYY-MM-DD HH:MM:SS
time HH:MM:SS
price #,##0.00
dollar [$$-1009]#,##0.00;[RED]-[$$-1009]#,##0.00
euro #,##0.00 [$€-407];[RED]-#,##0.00 [$€-407]

Basic cell styles have been available since version 0.30

style allowed values
font Arial, Times New Roman, Courier New, Comic Sans MS
font-size 8,9,10,11,12 ...
font-style bold, italic, underline, strikethrough or multiple ie: 'bold,italic'
border left, right, top, bottom, or multiple ie: 'top,left'
border-style thin, medium, thick, dashDot, dashDotDot, dashed, dotted, double, hair, mediumDashDot, mediumDashDotDot, mediumDashed, slantDashDot
border-color #RRGGBB, ie: #ff99cc or #f9c
color #RRGGBB, ie: #ff99cc or #f9c
fill #RRGGBB, ie: #eeffee or #efe
halign general, left, right, justify, center
valign bottom, center, distributed
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].