Advertisement
Guest User

Untitled

a guest
Sep 9th, 2016
837
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. $this->load->library('PHPExcel');
  2. $this->load->library('PHPExcel/IOFactory');
  3.  
  4. $cache = PHPExcel_CachedObjectStorageFactory::cache_to_phpTemp;
  5. $cacheSettings = array( ' memoryCacheSize ' => '8MB');
  6. PHPExcel_Settings::setCacheStorageMethod($cache, $cacheSettings);
  7.  
  8. $objReader = new PHPExcel_Reader_Excel2007();
  9. //$objReader->setReadDataOnly(true);
  10. $objPHPExcel = $objReader->load("./public/data/taxes.xls");
  11. $sheet = $objPHPExcel->getSheet(0);
  12. var_dump($sheet);
  13.  
  14. Fatal error: Uncaught exception 'PHPExcel_Exception' with message
  15. 'Your requested sheet index: 0 is out of bounds.
  16. The actual number of sheets is 0.'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement