APD Toronto
asked on
PHPExcel UTF-8
Hi Experts,
How can I specify PHPExcel to use UTF-8?
Using PHPExcel I am trying to add chart, but as soon as I do I get "unreadable content" in Excel. With research I have found this Link. To test this theory, I found that my generated file with PHPExcel and the Chart that open without issue on my iPad, but not on my Windows 7 x64 / Excel 2010.
How can I fix this issue?
How can I specify PHPExcel to use UTF-8?
Using PHPExcel I am trying to add chart, but as soon as I do I get "unreadable content" in Excel. With research I have found this Link. To test this theory, I found that my generated file with PHPExcel and the Chart that open without issue on my iPad, but not on my Windows 7 x64 / Excel 2010.
How can I fix this issue?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
How would I adapt this in PHPExcel - my scenario above?
It looks like you're swimming upstream to try using UTF-8 data with Microsoft applications. You might want to ask "why do I need UTF-8?" and see if there is a way you can get get the job done without using UTF-8, perhaps by using a different encoding, then converting to UTF-8 only when required. As noted, Microsoft is unhelpful, and the Stack reference is years old with little information. What are the UTF-8 characters you need that cannot be represented in ISO-8859-1 or CP-1252?
ASKER
It has nothing to do with characters. This issue originated when I created a chart in PHPExcel and as soon as I added the following line I got unreadable content within Excel.
$excelWriterObj->setInclud eCharts(TR UE);
Within PHP I get no errors, and the file is created, but when I open the file in Excel 2010 under Windows 7 I get the above error and no chart.
When I open the same file on a MAC, there is no error and the chart is visible. The stack article suggesting UTF-8, and I also don't understand why, but I am just looking for a way to make the file work in Excel2010/Windows 7.
$excelWriterObj->setInclud
Within PHP I get no errors, and the file is created, but when I open the file in Excel 2010 under Windows 7 I get the above error and no chart.
When I open the same file on a MAC, there is no error and the chart is visible. The stack article suggesting UTF-8, and I also don't understand why, but I am just looking for a way to make the file work in Excel2010/Windows 7.
So you don't need PHPExcel to use UTF-8?
Suggest you close this question and post a new one that says what you need. I think if we have the original input data and a good picture of the desired output we might be able to suggest some good answers. I thought this was about UTF-8, but maybe I was misunderstanding the problem.
Suggest you close this question and post a new one that says what you need. I think if we have the original input data and a good picture of the desired output we might be able to suggest some good answers. I thought this was about UTF-8, but maybe I was misunderstanding the problem.
ASKER
But the stack solution was UTF8
ASKER
In phpMyAdmin, I see that all tables are utf8_general_ci
Does this cover your suggestions from above?
I thought this is a PHPExcel Setting, or something to do with the fact that I copying an existing file, opening the copied file, modifying it, then re-saving it?