$excel = new \shayvmo\phpExcel([ 'savePath'=>'D:\wamp64\www\phpExcel\Examples', 'filename'=>'test_file'.time(), 'properties'=>[ 'Creator'=>'Eric', 'LastModifiedBy'=>'Eric', 'Title'=>'导出文档', 'Subject'=>'导出文档', 'Description'=>'php导出文档', 'Keywords'=>'', 'Category'=>'', ], 'worksheet'=>[ ['Title'=>'sheet01'] ], 'startCell'=>'A1', 'options'=>[ 'print'=>true,
'freezePane'=>[],
'setARGB'=>[ 'A1'=>'FFFFFF00', 'F2'=>'FFFFFF00' ],
'setWidth'=>[ 'A'=>10, 'B'=>15, 'C'=>20 ],
'setBorder'=>['A1:I3','000000'],
'mergeCells'=>['A1:B1','B2:B3'],
'formula'=>[],
'format'=>['A'=>''],
'alignment'=>[
'A:I'=>['center','center'], ],
'bold'=>['A1:I1','E2'], ], 'data'=>[ [ 'A'=>'供应商', 'B'=>'商品名称', 'C'=>'系统编号', 'D'=>'条形码', 'E'=>'规格', 'F'=>'单位', 'G'=>'采购价采购价采购价采qwsdqwwe购价采购价2采购价采购价采购价', 'H'=>'零售价', 'I'=>'库存', ], 2=>[ 'A'=>'1', 'B'=>'2', 'C'=>'3', 'D'=>'4', 'E'=>'5', 'F'=>'6', 'G'=>'7', 'H'=>'8.01', 'I'=>'9.03', ] ] ]);
$excel->exportExcel();
|