Jump to content

PHPExcel - åäö problem


snuffish

Recommended Posts

Hi, I'm working to generate a excel file with the PHPExcel library. But I got a big problem.

The excel file will not open if the file contains the characters "åäö" (that's swedish characters).

I got this error after I have generated the file and want to open it:

 

 <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> 
- <recoveryLog xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">
  <logFileName>error021840_01.xml</logFileName> 
  <summary>Errors were detected in file 'C:\DOCUME~1\snuffish\LOKALA~1\Temp\report-46.xlsx'</summary> 
- <removedParts summary="Following is a list of removed parts:">
  <removedPart>Removed Part: /xl/sharedStrings.xml part with XML error. (Strings) Illegal xml character. Line 97, column 26.</removedPart> 
  </removedParts>
- <removedRecords summary="Following is a list of removed records:">
  <removedRecord>Removed Records: Cell information from /xl/worksheets/sheet1.xml part</removedRecord> 
  <removedRecord>Removed Records: Cell information from /xl/worksheets/sheet2.xml part</removedRecord> 
  </removedRecords>
  </recoveryLog>

 

But the problem is that the error only appears when I receive a string form the MySql database that contains those characters. It's work perfectly when I write words directly in the source.

I have tried to change all types of encoding (UTF-8/ANSI etc..) but nothing works and I have searched through the whole web. But I can't find the answer.

 

So I would be very glad if anyone could help me as soon as possible.

 

// Best regards Christoffer!

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.