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 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵