Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
生成时打开phpExcel文件_Php_Phpexcel - Fatal编程技术网

生成时打开phpExcel文件

生成时打开phpExcel文件,php,phpexcel,Php,Phpexcel,此代码用于创建xlsx文件: $objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel); $objWriter->save(str_replace('.php', '.xlsx', __FILE__)); 我希望允许访问者在选择“打开或保存”时访问并获取文件 你知道我怎么才能得到这个吗 提前感谢。文件夹中/Examples中01simple download xlsx.php中的代码显示了如何执行此操作: // Redirect o

此代码用于创建xlsx文件:

$objWriter = new PHPExcel_Writer_Excel2007($objPHPExcel);
$objWriter->save(str_replace('.php', '.xlsx', __FILE__));
我希望允许访问者在选择“打开或保存”时访问并获取文件

你知道我怎么才能得到这个吗


提前感谢。

文件夹中
/Examples
01simple download xlsx.php
中的代码显示了如何执行此操作:

// Redirect output to a client’s web browser (Excel2007)
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition: attachment;filename="01simple.xlsx"');
header('Cache-Control: max-age=0');

$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save('php://output');
exit;

/Examples
文件夹中的
01simple download xlsx.php
中的代码显示了如何执行此操作:

// Redirect output to a client’s web browser (Excel2007)
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition: attachment;filename="01simple.xlsx"');
header('Cache-Control: max-age=0');

$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save('php://output');
exit;

/Examples
文件夹中的
01simple download xlsx.php
中的代码显示了如何执行此操作:

// Redirect output to a client’s web browser (Excel2007)
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition: attachment;filename="01simple.xlsx"');
header('Cache-Control: max-age=0');

$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save('php://output');
exit;

/Examples
文件夹中的
01simple download xlsx.php
中的代码显示了如何执行此操作:

// Redirect output to a client’s web browser (Excel2007)
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition: attachment;filename="01simple.xlsx"');
header('Cache-Control: max-age=0');

$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007');
$objWriter->save('php://output');
exit;

您是否看过
01simple download xlsx.php
等示例,了解它如何将标题发送到浏览器?以及如何保存到
php://output
您是否查看过示例,如
01simple download xlsx.php
以了解它如何将标题发送到浏览器?以及如何保存到
php://output
您是否查看过示例,如
01simple download xlsx.php
以了解它如何将标题发送到浏览器?以及如何保存到
php://output
您是否查看过示例,如
01simple download xlsx.php
以了解它如何将标题发送到浏览器?以及如何保存到
php://output