PHPExcel
PHPExcel ã§ã°ã©ããæ¸ãã表ããã³ãã¬ã¼ãã¨ãã¦ããã¦
ãããèªã¿è¾¼ãã§PHPã§æ°åãæ¸ãè¾¼ãã§ãã¡ã¤ã«åºå
ã£ã¦ããã®ãã£ããã°ã©ããæ¶ããã
è²ã
調ã¹ã¦ããããã³ãã¬ã¼ããç·¨éãã¦å¥åã§ä¿åããå¾ããã³ãã¬ã¼ãã®ã·ã¼ããã¼ã¿ãç·¨éå¾ã®ãã¡ã¤ã«ã§ä¸æ¸ãããã¨ããã¨ããã£ããã ãã©ãªããæ±ãããã ã£ãã®ã§
PHPExcelã®ãµã³ãã«å
ã«ä¸è¨ã®æ§ã«ãã£ããã§ããã
// ãã³ãã¬ã¼ãã®èªã¿è¾¼ã¿ $objReader = PHPExcel_IOFactory::createReader('Excel2007'); $objReader->setIncludeCharts(TRUE); // ããããã¤ã³ã $book = $objReader->load('ãã³ãã¬ã¼ãã®ãã¡ã¤ã«ãã¹'); /*-- ããã§æ°åã®æ¸ãè¾¼ã¿æä½ --*/ // åºå header('Content-Type: application/octet-stream'); header('Content-Disposition:attachment;filename="test.xlsx"'); $writer = PHPExcel_IOFactory::createWriter($book, 'Excel2007'); $writer->setIncludeCharts(TRUE); // ããããã¤ã³ã $writer->save('php://output');