0

I am in searching to find a solution to convert the .xlsx(Excel) file into pdf files.

require_once('phpExcel/PHPExcel/IOFactory.php');
require_once('phpexcel/PHPExcel.php');

$fileType = 'Excel5';
$fileName = 'testing.xlsx';
$outputFileType = 'PDF';
$outputFileName = 'test.pdf';

$objPHPExcel = PHPExcel_IOFactory::load($fileName);
$objWriter = PHPExcel_IOFactory::createWriter($objPHPExcel, $outputFileType);
$objWriter->writeAllSheets();
$objWriter->save($outputFileName);

I used this above code,but is not working. If any can an Idea, please help me

pnuts
  • 58,317
  • 11
  • 87
  • 139
user3331946
  • 11
  • 1
  • 4
  • Refer http://stackoverflow.com/questions/22797737/converting-excel-to-pdf-xlsx-to-pdf-using-phpexcel http://stackoverflow.com/questions/5538584/convert-word-doc-docx-and-excel-xls-xlsx-to-pdf-with-php – bgs Jun 19 '14 at 09:36
  • So which rendering engine are you using for PDF? It's not visible in your code at all. See section `6.9` of the developer documentation for details on writing to PDF – Mark Baker Jun 19 '14 at 09:39

0 Answers0