没有使用PHPExcel //文件加载没有图像的Excel图像工作正常。任何原因?

时间:2017-10-12 19:46:41

标签: php

<?php
require ("Classes/PHPExcel.php");

require ("Classes/PHPExcel/IOFactory.php");


//include ("Classes/IOFactory.php");

$excel2 = PHPExcel_IOFactory::createReader("Excel2007");
echo "start";

$excel2 = PHPExcel_IOFactory::load('test.xls');


echo "loading working";
echo "<br/>";


$excel2->setActiveSheetIndex();



$excel2->getActiveSheet(0)

        ->setCellValue("G1", "Test tag no.")

        ->setCellValue("G2", "Test service")        

$file = PHPExcel_IOFactory::createWriter($excel2, "Excel5"); 


echo "edit working";

echo "<br/>";

$name = ('test.xls');


//$file->save("php://output");

//echo "Saving working";

//exit;


$file->save($name);

echo "Saving working";

?>

0 个答案:

没有答案