상속: implements ExcelAnt\Adapter\PhpExcel\Workbook\WorkbookExcelInterface
예제 #1
0
 /** {@inheritdoc} */
 public function create($path, array $firstRow, $sheetName = '')
 {
     $workbook = new Workbook();
     $sheet = new Sheet($workbook);
     $table = new Table();
     $table->setRow($firstRow);
     $sheet->addTable($table, new Coordinate(1, 1));
     $workbook->addSheet($sheet);
     $writerFactory = new WriterFactory();
     $writer = $writerFactory->createWriter(new Excel5($path));
     $phpExcel = $writer->convert($workbook);
     $writer->write($phpExcel);
 }
예제 #2
0
파일: Sheet.php 프로젝트: Asisyas/ExcelAnt
 /**
  * @param WorkbookInterface $workbook         The parent Workbook where the Sheet will live
  * @param PHPExcel_Worksheet $phpExcelWorksheet
  */
 public function __construct(Workbook $workbook, PHPExcel_Worksheet $phpExcelWorksheet = null)
 {
     $this->phpExcelWorksheet = $phpExcelWorksheet ?: new PHPExcel_Worksheet($workbook->getRawClass());
 }