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. Advertisements

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 (here). After that, you can post your question and our members will help you out.