예제 #1
0
파일: Excel.php 프로젝트: ymnl007/Clerk
 /**
  * @throws \Maatwebsite\Clerk\Exceptions\DriverNotFoundException
  * @return \Maatwebsite\Clerk\Writer
  */
 public function initWriter()
 {
     $writer = WriterFactory::create($this->getDriver('writer'), $this->getFormat(), $this->getExtension(), $this->getWorkbook());
     return $writer;
 }
예제 #2
0
 public function test_factory_returns_exception_when_trying_to_use_it_without_sheets()
 {
     $this->setExpectedException('Maatwebsite\\Clerk\\Exceptions\\ExportFailedException');
     $workbook = new Workbook('mock');
     WriterFactory::create(new PHPExcel('drivers.writer.excel2003'), 'Excel5', 'xls', $workbook);
 }