Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6333271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T18:25:48+00:00 2026-05-24T18:25:48+00:00

In Excel, how can I convert the contents of a cell which includes accented

  • 0

In Excel, how can I convert the contents of a cell which includes accented characters, curly quotes etc into either HTML for the same characters, OR a transliterated plaintext version?

We have an XLS document which contains some “high” characters. The data has been pulled in via a DB connection, and it appears that Excel is correctly handling individual cells (or rows) being in different codepages.

When we export this data to a CSV, some high characters are not correctly rendered – it appears that Excel uses a single encoding for the document (of course), and the bit value of the characters from their original codepage (which may or may not be consistent with other values in the same document).

As Excel renders the text correctly before export, I believe we should be able to encode the high characters to their HTML equivalents at this point, then export to CSV, thus ensuring that the CSV is ASCII-only.

(Alternatively we could transliterate down to plain ASCII, but that seems like a poor approach and probably no easier …)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T18:25:48+00:00Added an answer on May 24, 2026 at 6:25 pm

    There is a function by pgc01 that seems to do the trick here:
    http://www.mrexcel.com/forum/showpost.php?p=2091183&postcount=7

    Hopefully it’s ok for me to quote their code:

    Function CodeUni(s As String, Optional bHex As Boolean = True)
        If bHex Then
            CodeUni = Right("0000" & Hex(AscW(Left(s, 1))), 4)
        Else
            CodeUni = AscW(Left(s, 1))
        End If
    End Function
    

    In case you’re not sure how to get that into your Excel workbook, this guide is pretty useful: http://office.microsoft.com/en-us/excel-help/create-custom-functions-in-excel-2007-HA010218996.aspx

    To summarise:

    1. Alt+F11 to bring up VBA editor
    2. Insert > Module
    3. Paste above code in
    4. Use function in your worksheet!

    To get it as a proper HTML encoded unicode entity, I used:

    ="&#"&CodeUni(C1, TRUE)&";"

    In my test case, I had ﻼ in C1 and in E1 the formula displays as &#FEFC;

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I'm trying to convert this Excel cell calculation into C#, but I can't
How can I convert text representations of numbers into Excel numbers, especially negative values?
I have an Excel sheet with cells containing html. How can I batch convert
Using PHP, I can convert MySQL data or static table data to csv, Excel,
How can I convert an Excel date (in a number format) to a proper
How can I convert/export binary data (for example binary files like excel- or word-documents)
Using Google Apps Script, I seek to extract the cell contents of an Excel
How can I convert emf file to excel by C#?
In an Excel formula you can use =ISERR(A1) or =ISERROR(A1) In a VBA macro
I want to know if PHPExcel can: Create Excel spreadsheets with embeded image. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.