Problem with diacritic characters when exporting data to Excel

C

ChrisN

My app displays a dataset in a GridView and also exports it to Excel.
Characters with diacritical marks (eg umlaut) show up just fine in the
GridView but are mangled when exported to Excel.

Eg

HKS Fördertechnik AG

becomes

HKS Fördertechnik AG

Here's a cut-down version of the export code:

response.Clear()
response.AddHeader("Content-Disposition",
"attachment;filename=" & "InvoiceData.csv")
response.ContentType = "application/vnd.ms-excel"
response.Charset=""
response.Write(ConvertDataViewToString(_exportData)) '
response.End()

Since the data looks okay in the database, and everything is in UNICODE
all the way through to Excel, what am I doing wrong?

Thanks,

Chris N
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,996
Messages
2,570,237
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top