Skip to content

a php extension to write an array to excel(.xlsx file) fast/快速导出PHP Excel xlsx文件

License

Notifications You must be signed in to change notification settings

friparia/php_fast_xlsxwriter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php_fast_xlsxwriter

a php extension to write an array to excel(.xlsx file) fast

一个快速导出Excel(.xlsx)文件的PHP扩展

Requirements

Installation

git clone https://github.com/friparia/php_fast_xlsxwriter
cd php_fast_xlsxwriter
phpize
./configure --with-xlsxwriter --with-libxlsxwriter=/path/to/libxlsxwriter
make && make install

Then, add extension=xlsxwriter.so in your php.ini file

Usage

xlsx_write

$a = ['a', 'b'];
$path = '~/test.xlsx';
xlsx_write($a, $path);
$b = [
    ['a', 'b'], ['a1', 'b1']
];
xlsx_write($b, $path);

xlsx_write_by_sheet

$c = [
    'sheet1' => [
        ['a', 'b'], ['a1', 'b1']
    ],
];
xlsx_write_by_sheet($b, $path);

About

a php extension to write an array to excel(.xlsx file) fast/快速导出PHP Excel xlsx文件

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published