phpExcel: Can't read certain files

Topics: Developer Forum
Jun 18, 2013 at 8:26 AM
Edited Jun 18, 2013 at 8:27 AM
What steps will reproduce the problem?
  1. Reading excel files of specific type
Additional Information:
  • Notice: iconv(): Detected an illegal character in input string in c:\PHPExcel\Classes\PHPExcel\Shared\String.php on line 496
  • No Errors (but still doesn't read)
  • It is programmed to read the name of the excel sheets and the data in it. But for some reason other excel files doesn't load, returns count of excel sheet to 0, and sometimes shows this error: Notice: iconv(): Detected an illegal character in input string in c:\PHPExcel\Classes\PHPExcel\Shared\String.php on line 496
This is the code that I am using:
require_once '../template/PHPExcel/Classes/PHPExcel.php';
$pasFile = $_FILES['inputFileLocation']['name'];
$inputFileType = PHPExcel_IOFactory::identify($pasFile);
$objReader = PHPExcel_IOFactory::createReader($inputFileType);
$worksheet_names = $objReader->listWorksheetNames($pasFile);
$countWorksheet = count($worksheet_names);
I searched for solutions on the internet, but failed to have one.
Coordinator
Jun 18, 2013 at 12:40 PM
If the steps to reproduce the problem entails reading excel files of specific types.... can you please provide examples of the specific types
Jun 20, 2013 at 7:33 AM
Mr. Baker I have included the excel files HERE, named UnableToReadFile.xls and UnableToReadSheets.xls.
Jun 24, 2013 at 6:55 AM
Edited Jun 24, 2013 at 6:56 AM
Is this discussion closed?
Coordinator
Jun 24, 2013 at 10:07 AM
No, I simply haven't discovered the problem yet, though I can't give it as much time as I'd like because I'm busy at the moment looking for a new job
Coordinator
Jun 24, 2013 at 9:28 PM
The exception I'm getting is:
PHPExcel_Reader_Exception: Cannot read encrypted file in C:\Projects\PHPOffice\PHPExcel\PHPExcel_1.7.9_Develop_Test\Classes\PHPExcel\Reader\Excel5.php on line 1577
This is triggered by the file containing a XLS_Type_FILEPASS record
Jul 23, 2013 at 7:40 AM
Edited Jul 23, 2013 at 7:42 AM
Is there any alternative way to extract data from excel? Or any other way to read a file containing XLS_Type_FILEPASS record?
Coordinator
Jul 23, 2013 at 11:52 AM
None that I'm aware of, other than using COM