Problem with diacritic characters when exporting data to Excel

Discussion in 'ASP .Net' started by ChrisN, Sep 19, 2006.

  1. ChrisN

    ChrisN Guest

    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
     
    ChrisN, Sep 19, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Goran Djuranovic
    Replies:
    0
    Views:
    359
    Goran Djuranovic
    Dec 10, 2004
  2. Replies:
    2
    Views:
    354
  3. Elisabeth Svensson via .NET 247

    Handling special characters when exporting DataGrid to Excel

    Elisabeth Svensson via .NET 247, Aug 4, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    590
    Pete Fearn
    Dec 21, 2004
  4. Exporting to Excel with Chinese Characters

    , Oct 15, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    0
    Views:
    299
  5. nwaits
    Replies:
    10
    Views:
    219
Loading...

Share This Page