PHP Classes

XLSX file upload not working.

Recommend this page to a friend!

      SimpleXLSX  >  All threads  >  XLSX file upload not working.  >  (Un) Subscribe thread alerts  
Subject:XLSX file upload not working.
Summary:XLSX file import not working
Messages:5
Author:Gowtham
Date:2013-11-22 05:50:21
Update:2013-11-22 09:46:31
 

  1. XLSX file upload not working.   Reply   Report abuse  
Picture of Gowtham Gowtham - 2013-11-22 05:50:21
Hi,
I have been using simplexlsx class for importing excel datas. But for past few days i have problems in importing documents with .xlsx extension.while .xls files work perfectly. When i try to upload .xlsx file, it shows a error message like "Warning: Invalid argument supplied for foreach()".
Small part of my coding is
require_once('../includes/excel/simplexlsx.class.php');
$xlsx = new SimpleXLSX('../includes/excel/uploads/'.$file_name);
It tells that the variable $xlsx->rows() is empty,but i am sure that $file_name has a valid file which contains data.I have updated my class file by replacing a new one too.Nothing happens.
Please help me regarding this.
Thanks :)


  2. Re: XLSX file upload not working.   Reply   Report abuse  
Picture of Sergey Shuchkin Sergey Shuchkin - 2013-11-22 06:36:33 - In reply to message 1 from Gowtham
Class support .xlsX files only
old .xls is not reading

* try rename your file to .zip and open

  3. Re: XLSX file upload not working.   Reply   Report abuse  
Picture of Gowtham Gowtham - 2013-11-22 07:04:45 - In reply to message 2 from Sergey Shuchkin
Thanks Sergey. I tried renaming the file but the problem still exists. Is there any update i should do for the class file?

Thanks :)

  4. Re: XLSX file upload not working.   Reply   Report abuse  
Picture of Sergey Shuchkin Sergey Shuchkin - 2013-11-22 09:38:58 - In reply to message 3 from Gowtham
try open your workbook.xlsx in MS EXcel

  5. Re: XLSX file upload not working.   Reply   Report abuse  
Picture of Gowtham Gowtham - 2013-11-22 09:46:31 - In reply to message 4 from Sergey Shuchkin
Thanks Sergey.Yes. i can read the contents in Ms Excel. and i can open the document in open office too.