Answer the question
In order to leave comments, you need to log in
How to upload a file from PHPExcel?
Hello. Using PHPExcel I'm trying to upload a file to the user:
header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet');
header('Content-Disposition: attachment;filename="'.$filename.'"');
header('Cache-Control: max-age=0');
$objWriter = PHPExcel_IOFactory::createWriter($workbook, 'Excel2007');
$objWriter->setPreCalculateFormulas(false);
$objWriter->save('php://output');
$objWriter = PHPExcel_IOFactory::createWriter($workbook, 'Excel2007');
$objWriter->save("c:\\l\\".$filename);
copy($pFilename, $originalFilename)
Answer the question
In order to leave comments, you need to log in
Look for this space somewhere in your script. For example, next to<?php
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question