fast-excel icon indicating copy to clipboard operation
fast-excel copied to clipboard

Error exporting large data

Open yakhyomus opened this issue 2 years ago • 3 comments

Php version 7.4 Laravel 8

Error message: Trying to add a value that exceeds the maximum number of characters allowed in a cell (32,767)

Table Products with 230 000 data.

function usersGenerator() { set_time_limit(7200); $products = Product::cursor(); foreach ($products as $product) { yield $product; } } return (new FastExcel(usersGenerator()))->export('test.xlsx');

How can i solve this error?

yakhyomus avatar Jun 08 '22 13:06 yakhyomus

How i solve this error: Just comment: vendor/box/spout/src/Spout/Writer/XLSX/Manager/WorksheetManager.php 272 line //throw new InvalidArgumentException('Trying to add a value that exceeds the maximum number of characters allowed in a cell (32,767)');

yakhyomus avatar Jun 09 '22 05:06 yakhyomus

Did you solve a problem introducing another probably problem, did you tried to dump the cells that exceed the 32767 characters? What inside?

StefanoTesla avatar Jul 13 '22 16:07 StefanoTesla

Did you solve a problem introducing another probably problem, did you tried to dump the cells that exceed the 32767 characters? What inside?

You were right, inside was big data. I shortened it and problem solved

yakhyomus avatar Jul 19 '22 06:07 yakhyomus