Load excel file into PHP_Excel from variable

后端 未结 3 1096
伪装坚强ぢ
伪装坚强ぢ 2020-12-16 20:26

I currently have this

file_put_contents($tmpfile, $attachments[0][\'body\']);
$objPHPExcel = PHPExcel_IOFactory::load($tmpfile);

The file I

3条回答
  •  萌比男神i
    2020-12-16 20:45

    PHPExcel provides no direct method for loading from a string rather than from a file. As an alternative to actually creating a physical filesystem file for $tmpfile though, you might be able to use php://memory or php://temp

提交回复
热议问题