Problems reading excel (xlsx)

1

I have a problem that I have never had when reading an xlsx file, I explain what I'm trying to do. I have a script placed in a cron that downloads the attachments of an email account and then reads the information from the files and saves them in a database, but my problem comes from reading a file that comes from a specific person .
I try to read this type of file with the PHPExcel library and it does not let me read the excel, but instead if I open the excel and simply give it to save and execute the script it reads it to me perfectly and of course I want that this does not depend on a physical person .
Any idea why?
I have to say that the script reads several files excels (xlsx) but the one that comments does not leave me is as if it were empty, since neither error gives me the library. I hope you can help me, thank you!

This is part of my code to read the excel:

try
{  
 $objPHPExcel = PHPExcel_IOFactory::load($inputFileName);  
}  
catch(Exception $e)  
{  
 die('Error loading file "'.pathinfo($inputFileName,PATHINFO_BASENAME).'": '.$e->getMessage());  
}  

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

foreach($sheetData as $rec)  
{  
 echo $rec['A'];  
}  

PD. This is the excel: link

    
asked by edm 27.10.2017 в 17:56
source

0 answers