ColdFusion Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreColdFusion Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old February 23rd, 2012, 05:42 AM
safo2000 safo2000 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2009
Posts: 8 safo2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 23 m 34 sec
Reputation Power: 0
Arabic / Other languages POI Excel Writing

I have been trying to export data with Arabic characters into excel sheet using
POI, but just get junk characters as below

#F' EF #-/ 9ED'! (FC 'D%E'1'* /(J 'DH7FJ H#1 'D'3*A3'1 9F

Any suggestions/examples on this please?

sample code below

<cfimport taglib="./poi/" prefix="poi" />

<cfset variable.fname="FILES\Cdr-#DATEFORMAT(now(),'DD-MM-YY')#.xls">

<cfsilent>

<poi:document file="#ExpandPath( variable.fname )#"

style=" font-family: Arial; font-size: 10pt ; color: black ; whitespace: nowrap ; ">



<poi:classes>

<poi:class

name="title"

style="font-family: Arial ; color: white ; background-color: black ; font-size: 18pt ; text-align: center ;"

/>



<poi:class

name="header"

style="font-family: Arial ; background-color: green ; color: white ; font-size: 14pt ;"

/>

<poi:class

name="header2"

style="font-family: Arial ; background-color: red ; color: white ; font-size: 12pt ;"

/>

<poi:sheets>

<poi:sheet name="report1" style="margin-left:0.5; margin-right:0.5;">

<poi:columns>

<poi:column style="text-align: left ; width:200px ;" />

<poi:column style="text-align: left ; width:100px ;" />

<poi:column style="text-align: left ; width:500px;" />

<poi:column style="text-align: left ; width:300px ;" />



</poi:columns>



<!--- <poi:row >

<poi:cell type="string" value="" colspan="4"/>

</poi:row> --->



<poi:row >

<poi:cell value="Account" />

<poi:cell value="Name" />

<poi:cell value="Balance" />

</poi:row>



<cfloop query="info">

<poi:row >

<poi:cell type="string" value="#gfcpnc#" />

<poi:cell type="string" value="#g3nm1#" />

<poi:cell type="string" value="#g3nm1a#" />

</poi:row>

</cfloop>



</poi:sheet>

</poi:sheets>

</poi:document>

</cfsilent>

Reply With Quote
  #2  
Old February 23rd, 2012, 08:58 AM
kiteless kiteless is offline
Moderator
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 5,091 kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 2 Weeks 5 Days 2 h 53 m 27 sec
Reputation Power: 966
Sorry, I've never used the POI JSP tag library. If you just display the content on a web page (and not in an Excel file), do the right characters show up?

Reply With Quote
  #3  
Old February 24th, 2012, 03:40 AM
safo2000 safo2000 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2009
Posts: 8 safo2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 23 m 34 sec
Reputation Power: 0
Quote:
Originally Posted by kiteless
Sorry, I've never used the POI JSP tag library. If you just display the content on a web page (and not in an Excel file), do the right characters show up?


yes they do, even in PDF using cfdocument

Reply With Quote
  #4  
Old February 24th, 2012, 09:13 AM
kiteless kiteless is offline
Moderator
Dev Shed God (5000 - 5499 posts)
 
Join Date: Jun 2002
Location: Raleigh, NC
Posts: 5,091 kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level)kiteless User rank is General (90000 - 100000 Reputation Level) 
Time spent in forums: 2 Weeks 5 Days 2 h 53 m 27 sec
Reputation Power: 966
OK then I'd say that means it is an encoding issue either in POI or in the Excel file. I'd see if you can find anything on specifying the encoding in POI. I've never needed to write anything other than English characters so that's just a guess, but it sounds like its not creating it with UTF-8 encoding.

Reply With Quote
  #5  
Old February 27th, 2012, 02:19 AM
safo2000 safo2000 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2009
Posts: 8 safo2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 23 m 34 sec
Reputation Power: 0
I tried doing that before I posted my question, the forum was my last resort. Couldn't find anything

Reply With Quote
  #6  
Old October 9th, 2012, 05:04 AM
safo2000 safo2000 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2009
Posts: 8 safo2000 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 23 m 34 sec
Reputation Power: 0
Quote:
Originally Posted by safo2000
I tried doing that before I posted my question, the forum was my last resort. Couldn't find anything


i just got back to this issue today and found out after some research that upgrading your POI to a newer version (say 3.7) will solve the problem at hand.


Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreColdFusion Development > Arabic / Other languages POI Excel Writing

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap