简体   繁体   中英

How to add heading inside excel using export excel in php

I am using php to export data to excel. How can I set custom heading before data inside excel?

header('Content-Type: text/csv');
header('Content-Disposition: attachment;filename=exported-data.csv');

The PHPExcel plugin lets you create .xlsx files etc. using PHP and set the formatting of the output with the PHP script. Plugin is available here: https://github.com/PHPOffice/PHPExcel

I've found it fairly easy to setup but have had occasional timeout issues when working with large data sets.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM