I am working on import price of products using xls, xlsx, ods and csv files.

For that i need to read these file, i had use seperate external library files to read those files.

It works well in my local machine, when i move it to server my admin controller doesn't work, it displays blank page.

I found that is because i have included external library files in my admin controller.(when i command those lines controller works fine in server)

so then i have used below format to include lib files :

require_once(Mage::getBaseDir('lib'). DS . '[folder_name]/easyODS.php');
require_once(Mage::getBaseDir('lib'). DS . '[folder_name]/simplexlsx.class.php');
require_once(Mage::getBaseDir('lib'). DS . '[folder_name]/reader.php');

after this change xlsx, ods and csv(i didn't use lib file for csv) working fine but xls doesn't.

kindly give me suggestion to do this stuff.

  • 1
    anybody faced this issue already? – Priya Ponnusamy Jul 28 '16 at 13:28

I have fixed the issue...simple thing i have done
i have changed the below line in my library file that i used to read .xls file
the line is :

function Spreadsheet_Excel_Reader()
    $this->_ole =& new OLERead();

Changed To

function Spreadsheet_Excel_Reader()
    $this->_ole = new OLERead();

I have just removed the '&'(ampersand) from the line. Problem Solved!!!... Now it is working well.

  • can you please describe how to call php library in controller ? – Sarfaraj Sipai Oct 17 '18 at 11:05

First of all debug the path :

require_once(Mage::getBaseDir('lib'). DS . '[folder_name]/easyODS.php');

the path which is created able to open file in browser? and then try to add relative path of the file.

  • thanks for your answer, i will check with this and let you know – Priya Ponnusamy Aug 3 '16 at 7:14
  • i have resolved my issue MageComp..above is my answer – Priya Ponnusamy Aug 6 '16 at 6:57
  • this is not workig in controller. – Sarfaraj Sipai Oct 17 '18 at 11:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.