Google Answers Logo
View Question
 
Q: Excel export encoding problem ( big tip ) ( No Answer,   1 Comment )
Question  
Subject: Excel export encoding problem ( big tip )
Category: Computers > Software
Asked by: modjoe23-ga
List Price: $10.00
Posted: 13 Nov 2006 20:13 PST
Expires: 13 Dec 2006 20:13 PST
Question ID: 782546
I am trying to figure out how to fix my problem when exporting from my
C# asp.net application to excel. The problem I am facing is that I
need my character set to be UTF-8 compliant and it seems that Excel
will open the default codepage when it opens the report so it will not
recognize some characters ( Korean ) for example and will replace them
with question marks.

I know that using JET OLE is one of the ways to go to fix this. If you
tell me that it is not and support it I will definitely put in a bonus
tip. Otherwise, what I am looking for is what are the possible
solutions. A detailed explanation will also get a much bigger tip. I
know this can be done precisely because Google Adwords does it when
generating excel reports.

Note: Setting charset = "utf-8" and .encoding = System.text.utf8 ( or
something of the sort ) does NOT work.

Thanks.

Request for Question Clarification by pafalafa-ga on 14 Nov 2006 19:48 PST
A long time ago I came across this site:


http://www.world-gazetteer.com/wg.php?x=1129163518&men=stdl&lng=en&gln=xx&dat=32&srt=npan&col=aohdq


with a huge database download, and a small script for utf-8 issues. 
See the section about "Importing Data to Excel", and let me know if
that macro is what you need.

Good luck!

pafalafa-ga

Clarification of Question by modjoe23-ga on 21 Nov 2006 08:17 PST
Actually this is for export to Excel, not import to Excel. Thanks, but
this is not it.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Excel export encoding problem ( big tip )
From: pooranprasad-ga on 29 Nov 2006 12:03 PST
 
1. You can try writing this before rendering the excel
Response.ContentType = "application/vnd.ms-excel"
Response.AddHeader "Content-Disposition", "inline; filename=a.xls"

2. If it does not, check if these solve your issue
http://support.microsoft.com/kb/307029 and http://support.microsoft.com/kb/306023

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy