0

I have written this code, but not getting any output:

require_once 'SpreadsheetReaderFactory.php';

$spreadsheetsFilePath = 'data.ods';
$reader = SpreadsheetReaderFactory::reader($spreadsheetsFilePath);

$sheets = $reader->read($spreadsheetsFilePath);

print_r($sheets);
Rizier123
  • 58,877
  • 16
  • 101
  • 156
Bhulawat Ajay
  • 287
  • 2
  • 3
  • 16
  • 1
    Assuming that you're using `https://github.com/xhook/php-spreadsheetreader` then it doesn't support OASIS-format `.ods` files, just csv and BIFF-format `.xls` files – Mark Baker Nov 25 '15 at 10:18
  • then what is solution? @Mark – Bhulawat Ajay Nov 25 '15 at 10:20
  • The solution is to use a Reader library that does support OASIS format files, such as my own [PHPExcel](https://github.com/PHPOffice/PHPExcel/) library – Mark Baker Nov 25 '15 at 10:22

0 Answers0