Closed rzds closed 1 year ago
I've got the same issue
I believe Xls cannot support emoji. And even if it did, you really should use xlsx which has been around for more than 10 years already
tks all , i got same q.:)
Still not supported 💀💀💀
The problem is not restricted to emojis; it affects any text which uses characters not in the Unicode BMP. For Xls, Excel encodes its characters in UTF-16, generally a double-byte character set. But, for characters outside the BMP, UTF-16 uses "surrogates" to encode the character as 2 double-byte characters. Excel stores the number of 2-byte characters (so each non-BMP character counts as 2), but PhpSpreadsheet is storing the number of characters (so each non-BMP character counts as 1). Expect a fix in a day or two.
The problem is not restricted to emojis; it affects any text which uses characters not in the Unicode BMP. For Xls, Excel encodes its characters in UTF-16, generally a double-byte character set. But, for characters outside the BMP, UTF-16 uses "surrogates" to encode the character as 2 double-byte characters. Excel stores the number of 2-byte characters (so each non-BMP character counts as 2), but PhpSpreadsheet is storing the number of characters (so each non-BMP character counts as 1). Expect a fix in a day or two.
It`s really can be fixed? I've been thinking about switching to XLSWriter, I will wait thanks.
This is an old story and it only happens when generating Xls files, it doesn't with Xlsx files. The same issue in the deprecated PHPExcel https://github.com/PHPOffice/PHPExcel/issues/1320 No one said why this is happening. The reader works fine with emojis. Isn't this issue fixable?