I have an Excel file file.xlsx
. I open this file with PHPExcel and insert my datas:
$excel2->getActiveSheet()
->setCellValue('A2', $rowCardCode['podpodrazd'].", ".$rowCardCode['schet'])
->setCellValue('C2', $rowCardCode['tovar_name'])
->setCellValue('C3', $rowCardCode['edinica_izmer']);
After, I can save generated file with new name (temp/New_file.xlsx
).
$objWriter = PHPExcel_IOFactory::createWriter($excel2, 'Excel2007');
$objWriter->save('files/temp_file/card/card_'.time().'.xlsx');
I don't want to save generated file to the server. I just want generate Excel file and give it to user for downloading.
Is it possible to do?
Thanks.