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 stable diffusion
  • ¥100 Jenkins自动化部署—悬赏100元
  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算