PhpSpreadsheet composer zorunluluğu
Merhaba,
PhpSpreadsheet sanırım composer ile kullanılıyor.
kullanım için php'ye
require 'vendor/autoload.php';
eklememiz gerekiyor.
fakat ben birşeye bagımlı kalmadan direkt pluginmiş gibi kullanmak istiyorum.
composer olmadan bu eklentiyi kullanabilir miyim ?
bukadar basit olamaz degil mi :)
include "Spreadsheet.php";
include "Writer/Xlsx.php";
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use PhpOffice\PhpSpreadsheet\Writer\Xlsx;
$spreadsheet = new Spreadsheet();
$sheet = $spreadsheet->getActiveSheet();
$sheet->setCellValue('A1', 'Hello World !');
$writer = new Xlsx($spreadsheet);
$writer->save('hello world.xlsx');
şöyle bir hata veriyor.
Fatal error: Uncaught Error: Class "PhpOffice\PhpSpreadsheet\Writer\BaseWriter" not found in C:\Server\exx\vendor\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Writer\Xlsx.php:37 Stack trace: #0 C:\Server\exx\vendor\phpoffice\phpspreadsheet\src\PhpSpreadsheet\test.php(4): include() #1 {main} thrown in C:\Server\exx\vendor\phpoffice\phpspreadsheet\src\PhpSpreadsheet\Writer\Xlsx.php on line 37