PHP: Create Excel-File (XLS or XLSX)
Question by Guest | Last update on 2020-10-20 | Created on 2015-01-15
I would like to create a simple Excel spreadsheet on my webspace using PHP. The sheet or table should be exported or stored as XLS or XLSX file.
Are there any build in commands or libraries that you can recommend for this purpose?
Related Topics
XLS and XLSX: Maximum Number of Columns and Rows
Info | 2 Comments
PHP: File Download Script
Tutorial | 0 Comments
How to resize Image before Upload in Browser
Tutorial | 13 Comments
Convert many CSV Files to XLSX or ODS Spreadsheets
Tutorial | 0 Comments
MIME Types of Microsoft Office File Formats
Info | 0 Comments
Rename File to its Folder Name
Tutorial | 0 Comments
Google Tips: Search within documents of a specific file type (PDF, DOC, XLS, TXT, HTM etc)
Info | 0 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
I can recommend PhpSpreadsheet or PHPExcel for this. PhpSpreadsheet and PHPExcel are open source and can be used for free.
PHPExcel is the older project of the two and PhpSpreadsheet is the next version or further development.
I have made good experiences with it, you can quickly and simply create Excel files, you can export to many formats (XLS, XLSX, CSV, ODS, PDF, HTML) and it is even possible to open them. Additionally, you can not only insert some data, you can also change and use custom colors, fonts, backgrounds, images, formulas and much more.
Just have a look at the folder "samples" after downloading the library. You will find some useful examples of how to use PhpSpreadsheet or PHPExcel within.
Last update on 2020-10-20 | Created on 2015-01-15