How to export xls file in php

WBOY
Release: 2016-07-25 08:53:40
Original
1154 people have browsed it
  1. header("content-type: application/vnd.ms-excel");
  2. header("content-disposition: attachment; filename=example.xls");
  3. //Pay attention to the following The head and charset must be consistent with the encoding of the content you want to output, otherwise you may get garbled characters when you open it with excel.
  4. echo <<
  5. php output excel example
  6. Name Number Gender Birthday City
    Olympic Games 9527 Male 2008-08-08
  7. eot;
  8. ?>
Copy code


Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template