Closed GitOkaKaz closed 5 years ago
Can you please provide a code snippet which reproduces the error. A simple loop would be sufficient. It's hard to say where the problem occurs - could be php_excel, could be libxl - could be even your program. Thx
Thanks for your advise, and sorry for the late reply. I could identify the cause finally, here is some information to share.
Before, my code was like:
$excel = new ExcelBook(NULL, NULL, TRUE);
Then, I added the setLocale command, like this:
$excel = new ExcelBook(NULL, NULL, TRUE);
$excel->setLocale('ja_JP.UTF-8');
This solved my problem.
My example excel file, which containts both of Japanese and English letters, can now be generated normally, thanks to the effect of setLocale.
Thanks again.
I tested libxl and wrote to a excel sheet, using data size of 300 cols x 2,000 rows. Strangely, the program sometimes succesfully ends (without no problem), but sometimes, the program generates the sheet partially only (this means, some columns having valid data, while other columns having empty).
I try to open the excel files (both patterns of Failed and Success), after renaming the extension (from XLSX to ZIP), and I discovered there are some variances between those two files.
Especially, below file is the one with variances: Folder -> xl -> sharedStrings.xml
Please find more detail in the following sample (actual one):
**Not OK version (the string is missing)
<?xml version="1.0" encoding="UTF-8"?><sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="600000" uniqueCount="1"><si><t/></si></sst>
**OK version (with the string outputted properly)
<?xml version="1.0" encoding="UTF-8"?><sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="600000" uniqueCount="1"><si><t>SOME MESSAGE I PUT IN THE SHEET</t></si></sst>
Hopefully I can get some feedback about my finding.