0

just a php beginner question. How can I create an input to load the XLS file without having to download it on the server and use it in the code below where I have the variable $inputFileName.

<?php

/** Include path **/
set_include_path(get_include_path() . PATH_SEPARATOR . '../../../Classes/');

/** PHPExcel_IOFactory */
include 'PHPExcel/IOFactory.php';


**$inputFileName = './sampleData/example1.xls';**
echo 'Loading file ',pathinfo($inputFileName,PATHINFO_BASENAME),' using IOFactory to identify the format<br />';
$objPHPExcel = PHPExcel_IOFactory::load($inputFileName);


echo '<hr />';

$sheetData = $objPHPExcel->getActiveSheet()->toArray(null,true,true,true);
var_dump($sheetData);


?>

Thank you all...

Alex Howansky
  • 50,515
  • 8
  • 78
  • 98
  • I do not understand your question. What does "create an input" mean? Where is the file? – Alex Howansky Jan 18 '20 at 22:19
  • I need to load a file using the of the XLS type and be able to load it into my $ inputFileName variable in the code I showed. I need to make it dynamic so that anyone can upload an XLS file. – David Kenny Pimentel Jan 19 '20 at 00:51

0 Answers0