dsuikgi9199 2014-05-24 14:56
浏览 197
已采纳

基本PHPExcel输出Excel文件

I am using PHPExcel and executed their sample code as displayed on the website: https://phpexcel.codeplex.com/wikipage?title=Examples&referringTitle=Home

However, I can see the codes running well because I see this "message"

10:50:52 Create new PHPExcel object 10:50:52 Set properties 10:50:52 Add some data 10:50:52 Rename sheet 10:50:52 Write to Excel2007 format 10:50:52 Done writing file.

But I wasn't given an option to download any file? How do I trigger them to ask me to download the file?

  • 写回答

2条回答 默认 最新

  • doufei2007 2014-05-24 18:09
    关注

    If you look at some of the examples in the /Examples folder of the distribution or in the github repo, you'll find a number of examples with names like 01simple-download-xls.php or 01simple-download-xlsx.php that demonstrate how to send a generated Excel file to the browser.

    It's also a good idea to read the documentation, which also explains how to do this, e.g. section 4.6.40 of the developer documentation, entitled Redirect output to a client’s web browser.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 PADS Logic 原理图
  • ¥15 PADS Logic 图标
  • ¥15 电脑和power bi环境都是英文如何将日期层次结构转换成英文
  • ¥20 气象站点数据求取中~
  • ¥15 如何获取APP内弹出的网址链接
  • ¥15 wifi 图标不见了 不知道怎么办 上不了网 变成小地球了
  • ¥50 STM32单片机传感器读取错误
  • ¥50 power BI 从Mysql服务器导入数据,但连接进去后显示表无数据
  • ¥15 (关键词-阻抗匹配,HFSS,RFID标签天线)
  • ¥15 机器人轨迹规划相关问题