This commit is contained in:
philipp lang 2024-07-15 23:24:53 +02:00
parent 50a3c6df90
commit b20d05398b
1 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
namespace Zoomyboy\TableDocument;
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Writer\Csv;
use PHPUnit\Framework\Assert;
@ -12,7 +13,7 @@ trait TestsExcelDocuments
{
$filename = sys_get_temp_dir() . '/' . str()->uuid()->toString();
file_put_contents($filename, $content);
$spreadsheet = \PhpOffice\PhpSpreadsheet\IOFactory::load($filename);
$spreadsheet = IOFactory::load($filename);
$writer = new Csv($spreadsheet);
$writer->save($filename);
$spreadsheet->disconnectWorksheets();