Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. URGENT: Export to excel and special characters

URGENT: Export to excel and special characters

Scheduled Pinned Locked Moved Visual Basic
helptutorialquestion
4 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    buzzvishwanath
    wrote on last edited by
    #1

    I am exporting a dataset to Excel. I can successfully view the dataset in Excel however, there are special characters that are appearing in the form of Â, â€" and others. My code in VB starts off like this: Response.Clear() Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("content-disposition", "attachment;filename=GeneralInquiry.xls") I've tried setting the Response.Charset = "" but that doesn't do anything either. Would anyone know what could be causing this and/or how to fix it? Thank you.

    C L P 3 Replies Last reply
    0
    • B buzzvishwanath

      I am exporting a dataset to Excel. I can successfully view the dataset in Excel however, there are special characters that are appearing in the form of Â, â€" and others. My code in VB starts off like this: Response.Clear() Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("content-disposition", "attachment;filename=GeneralInquiry.xls") I've tried setting the Response.Charset = "" but that doesn't do anything either. Would anyone know what could be causing this and/or how to fix it? Thank you.

      C Offline
      C Offline
      coolestCoder
      wrote on last edited by
      #2

      Is it in ASP.NET ? Try using HtmlEncode and HtmlDecode ? This solved my problem for hyphen character.


      "A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder


      coolestCoder

      1 Reply Last reply
      0
      • B buzzvishwanath

        I am exporting a dataset to Excel. I can successfully view the dataset in Excel however, there are special characters that are appearing in the form of Â, â€" and others. My code in VB starts off like this: Response.Clear() Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("content-disposition", "attachment;filename=GeneralInquiry.xls") I've tried setting the Response.Charset = "" but that doesn't do anything either. Would anyone know what could be causing this and/or how to fix it? Thank you.

        L Offline
        L Offline
        leckey 0
        wrote on last edited by
        #3

        Please read the forum guidelines. Do not use urgent in your message titles.

        Current Rant: "Mormon Mania" http://craptasticnation.blogspot.com/[^]

        1 Reply Last reply
        0
        • B buzzvishwanath

          I am exporting a dataset to Excel. I can successfully view the dataset in Excel however, there are special characters that are appearing in the form of Â, â€" and others. My code in VB starts off like this: Response.Clear() Response.ContentType = "application/vnd.ms-excel" Response.AddHeader("content-disposition", "attachment;filename=GeneralInquiry.xls") I've tried setting the Response.Charset = "" but that doesn't do anything either. Would anyone know what could be causing this and/or how to fix it? Thank you.

          P Offline
          P Offline
          Paul Conrad
          wrote on last edited by
          #4

          Please don't use words like urgent. It is consider very rude around here.

          "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups