2
I have the following problem, I fill out a spreadsheet with a person’s information, however, names like D'Ana generate a problem in xlsx. D'Anna gets a square instead of the bet. the form of writing I use is this:
$writer = \PhpOffice\PhpSpreadsheet\IOFactory::createWriter($this->planilha, 'Xlsx');
$writer->save('php://output');
and when setting the value in the cell, I use:
planilha->setCellValue(utf8_encode($value['nome']);
For the other values, it works correctly, only for the apostrophe that creates problem. Can someone help me? grateful!
I don’t know if it’ll do much good, but I could try something like this:
planilha->setCellValue(utf8_encode("$value['nome']");
– Paulo Dos Santos
This generates a syntax error due to variable. Thanks anyway!
– Skinper
Pity! Phpspreadsheet has even problem with simple quotes.
– Paulo Dos Santos