本文介绍了我如何让用户选择一个文件夹来保存Excel文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 大家好。 我用 PHP 脚本从 MySQL 数据库中获取数据,之后我想要导出数据到MS Excel文件,我设法导出但是aplication本身支持使用下面的脚本下载,我使用了 PHPExcel lib: $ objPHPexcel = new PHPExcel(); $ name = ' a_name'; $ objWriter = PHPExcel_IOFactory :: createWriter($ objPHPExcel,' Excel5' ); header(' Content-type:application / vnd.ms-excel'); header(' Content-Disposition:inline; filename ='。$ name。' 。xls'); $ objWriter-> save(' php:// output'); 在导出数据之前,我希望应用程序显示用户一个对话框询问保存的位置,我该怎么办? 提前谢谢解决方案 objPHPExcel = new PHPExcel(); name = ' a_name'; objWriter = PHPExcel_IOFactory :: createWriter( Hello everyoneI obtained data from MySQL database with PHP script, and after I want export the data to MS Excel file, I managed to export but the aplication itselfs that supported Download with the script bellow, I used the PHPExcel lib:$objPHPExcel = new PHPExcel();$name = 'a_name';$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel5');header('Content-type: application/vnd.ms-excel');header('Content-Disposition:inline;filename='.$name.'.xls');$objWriter->save('php://output');Before exporting the data,I want that the application displays the user a dialog box that asks where to save, How i can do it ?thank you in advance 解决方案 objPHPExcel = new PHPExcel();name = 'a_name';objWriter = PHPExcel_IOFactory::createWriter( 这篇关于我如何让用户选择一个文件夹来保存Excel文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云! 07-25 07:57