Search code examples
csvunicodeexport-to-csv

How to save Unicode Bangla CSV from XLSX?


After citing this StackOverflow thread, I'm posting here. I have an Excell 2007 (.xlsx) file with Bangla Unicode characters and English characters as well, like:

+------+---------+------------------+--------------+----------+
| name | company | responsibilities | started from | added_by |
+------+---------+------------------+--------------+----------+
| আলম  | কোম্পানীর নাম |       কর্মযজ্ঞ ১     |  2013/01/01  |   2305   |
| স্মরণ  | কোম্পানীর ধাম |       কর্মযজ্ঞ ২     |  2013/02/01  |   2155   |
+------+---------+------------------+--------------+----------+

I'm trying to save it into a Comma-Separated Values file - CSV (.csv). I've experience in creating and uploading CSV in English, but this time the problem is with the Unicode characters.

MISSION #1

Procedures: Save as » Other formats » CSV - Save.

Result: Renders Bangla characters as scrambled.

Status: Failed


MISSION #2

Procedures: Save as » Other formats » Unicode Text - Save.
Created a Tab separated CSV file.
Opening the .txt file into Notepad++ or Dreamweaver, and Find-Replace "tab" with "comma".

Result: Nicely done. Except some English characters are generating boxes, just when the replacing took place!

Status: Failed


  • What can I do then?

Solution

  • Solution #1 - Lengthy Process

    Save as » Other formats » Unicode Text - Save.
    Creating a Tab separated CSV file.
    Open the .txt file in Notepad (Notepad.exe)
    In notepad, File » Save as » Encoding : UTF-8 » (choose a different name) » Save
    Open the file in Notepad++, Find&Replace the "tab" with "comma".
    Save it.

    Done!

    Courtesy: Thanks to Tahmina Akhtar

    Solution #2 - Shortcut Process

    Download and Install an AddIn for Excell 2007. This Article will assist you through the process.

    Download the file from Here. It will download an installer only. After downloading, click on the Setup.exe. It'll start downloading its necessary components. After a complete download, install the AddIn. The system will reboot completely. Reboot the PC. Let's the installation complete.

    Open the .xlsx file in MS Excell 2007. You will find a new Ribbon saying: Unicode CSV. Click on it, and Save the file.

    Done!

    NOTE:
    None of the processes is completely bug-free. So, try 'em or find your new one, and why not let us know too.

    Edit 2015-Aug-27

    Wrote a complete article in Bengali on how to upload Bengali content using PHP-MySQL. You can check out.