Exported Data to .CSV files with accented characters does not import correctly into MS Excel
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
Legacy Article
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Issue
- After exporting data from contacts stored in Liferay to a .CSV file, it was found that when trying to import that .CSV file to Microsoft Excel, if there were letters and words that contained accents (i.e. á, é, í, ó, ú), these letters were replaced with other symbols and letters.
Environment
- This issue is only reproducible with Microsoft Excel, and was not reproducible in LibreOffice Calc
Resolution
- This occurs because Liferay exports the entries into a .CSV file using UTF-8 encoding. However, by default, Microsoft Excel does not import .CSV files using UTF-8 encoding, causing the accented characters to display improperly.
- The steps below provide a way to import data so that the accented letters display properly.
- Open Microsoft Excel
- Select File -> New
- Select the Data tab
- Select "From Text" and select the .CSV file
- Select "Delimited"
- For "File origin", select "65001: Unicode (UTF-8)"
- Select "Next"
- Select "Comma"
- Select "Finish"
Did this article resolve your issue ?