5 Replies Latest reply on Oct 1, 2009 2:42 PM by Adam Cameron.

    Export Japanense Language to Excel

    drew_lw

      What I have is a translation mechanism where I'm trying to export the language in a database to an excel document for easier end user translation. The excel doc is than imported back into the database using an SSIS package.

       

      I am simply using the <cfcontent> and <cfheader> tags to export the page contents to the excel worksheet.

       

      When the excel doc loads for the japanese the language characters aren't even close. I have tried using different charset attributes in the header tag to no avail. If I remove the content/header tags and display the text directly to the website output it appears fine. If I copy the text from the site into excel that works just as fine as well so it's not a missing language package in excel.

       

      Any ideas?

        • 1. Re: Export Japanense Language to Excel
          Adam Cameron. Level 5

          Can you provide us some example code that demonstrates your problem?

           

          --

          Adam

          • 2. Re: Export Japanense Language to Excel
            drew_lw Level 1

            Actually, according to privacy contracts I've signed I can't really share anything code related about it. I can however summarize it a little bit better.

             

            The output of the page is two column based, formated using html tables.

             

            Column #1 consists of the English language
            Column #2 consists of the Japanese language

             

            <html>

            <head>

            <title>Page</title>

            </head>

            <body>

            <table>

            <cfloop>

            <tr>

              <td>Column #1</td>

              <td>Column #2</td>

            </tr>

            </cfloop>

            </table>

            <body>

            </html>

             

            The data is called by invoking a coldfusion component that pulls the data from a sql db.

             

            Of course to output this data to excel I have added two coldfusion lines of code at the top

            <cfcontent type="application/msexcel">

            <cfheader name="Content-Disposition" value="filename=filename.xls">

            • 3. Re: Export Japanense Language to Excel
              drew_lw Level 1

              I solved this issue...

               

              Updated the content to include the charset attribute rather than the header tag, easy enough. blah!

               

              <cfcontent type="application/msxcel; charset="ISO-2022-jp">

              • 4. Re: Export Japanense Language to Excel
                Adam Cameron. Level 5

                Good that you fixed it.

                 

                Just a note re your comment about privacy contracts: I didnt mean to just slap your actual code in there; because that'll often have too many "moving parts" to be clear as to what is causing the problem.  Part of troubleshooting a problem should be to create a minimalist replicable case of the problem.  This process helps eliminate possible contributing factors that actually have been demonstrated not to contribute.

                 

                For an example, see my post on this other thread.

                 

                I only say this because not being able to see the code when one has an issue is usually quite a big blockage to sorting the issue out (not so in this case, obviously), and "confidentiality" is seldom actually a good reason to not present some steps to replicate the issue.

                 

                --

                Adam

                1 person found this helpful
                • 5. Re: Export Japanense Language to Excel
                  drew_lw Level 1

                  No problem at all, thank you for the insight and I will keep this in mind for future posts.