+ Reply to Thread
Results 1 to 4 of 4

Using the EURO symbol in filenames

  1. #1
    Registered User
    Join Date
    01-03-2011
    Location
    London, UK
    MS-Off Ver
    Excel 2007
    Posts
    7

    Using the EURO symbol in filenames

    Hi
    Sorry if this has long since been discussed and solved, but sadly in searching the forum and the web, I can't find a solution! doh!
    I guess the fact I'm in the UK might be relevant to code pages etc

    I'm reading in (well cut and pasting from a text file, generated by a dos piped dir command) a list of file names that have £, $ and € currencies within the file name
    The $ symbol are fine as excel retains the symbol with no hassle
    The £ symbol becomes œ (char 156), so I can use "substitute" to convert to char 163
    The € symbol becomes a standard ? (char 63) so this can be changed to char 128 as "?" are not used in the file names, so no chance of extra € appearing!

    SUBSTITUTE(SUBSTITUTE(C2,char(156),CHAR(163)),CHAR(63),CHAR(128))

    So reading in is fine, but then I need to write it back, as it will become a batch file of rename commands (yes, I could write some VBA rather than creating a batch file, but this is a quick and dirty project - or was quick till I hit this brick wall !)

    So for the £ values I use the following to reformat them to work in the batch file, and it works fine

    TEXT(VALUE(AO2),CHAR(156)&"0.00")

    Sadly the EURO (€) cannot be written as char 63 "?", and I have tried char 250 and char 128, but none work ...

    Is there are char that will work, if not can this be done in VBA, if so what char should I use?

    Everything else is fine, just the pesky EURO! ... and no I'm not joining UKIP to avoid the issue :-)

    thanks in advance

  2. #2
    Valued Forum Contributor adyteo's Avatar
    Join Date
    01-10-2013
    Location
    Calgary
    MS-Off Ver
    Excel 2010
    Posts
    540

    Re: Using the EURO symbol in filenames

    for me this gives the € symbol.
    Please Login or Register  to view this content.
    for me the £ is char(163)
    Click on the star if you think I helped you

  3. #3
    Registered User
    Join Date
    01-03-2011
    Location
    London, UK
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Using the EURO symbol in filenames

    Thanks for the reply, Sorry, I was not clear.

    Yes reading in the file is fine, and using char 128 produces the € (Euro) symbol in Excel. Excel itself I can convert to display properly.

    It's the writing it back to use in a batch file within a CMD console, for this the £ sign needs to be converted from excel char 163 back to char 156
    but for the € Euro symbol I can't work out what to use, as 128 does not display as a € and the character substituted by the system on reading it in is a vanilla ? char 63 and that does not work writing it back out.

    It's not the excel display that I have an issue with but the writing back into a format that I can use in a DOS batch file.

    The cell in excel would contain a formulae to produce the following text (the formulae itself is the problem, its the specific char code for a EURO symbol €.

    Cell:
    REN "c:\test dir\value_€12.23.pdf" "value_paid_€11.95.pdf"
    but this (with €) is cut and paste to a batch file and then run it produces a totally different character.

    I hope that helps clarify?!
    thanks
    Richard

  4. #4
    Registered User
    Join Date
    01-03-2011
    Location
    London, UK
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Using the EURO symbol in filenames

    Ok, here's an example:

    As an example take this, and paste into a cell in excel:
    Please Login or Register  to view this content.
    You get a nice shiny € symbol.

    To demonstrate the issue:
    1. create a file called value.txt, just right click in windows explorer, create new text file
    2. same thing again, but rename it to action.bat
    3. Now paste the text into the action.bat file (just hit ctr-c in excel and ctr-v in the text file)

    you'll have a single statement that reads
    REN value.txt value€123.txt
    save it and then run it ...
    you'll find the file is not called "value€123.txt" as expected but is in fact "valueΗ123.txt"

    that's my issue!! I need the filename to show a € in it ...

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 9
    Last Post: 02-14-2009, 01:50 PM
  2. [SOLVED] euro symbol loses formatting if bold
    By cadiehl in forum Excel General
    Replies: 2
    Last Post: 07-31-2006, 09:53 AM
  3. How can I change dollar sybbol to euro symbol?
    By zwerver in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 01-31-2006, 03:00 PM
  4. € (euro) symbol in Excel charts
    By bananabob in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 09-20-2005, 09:05 AM
  5. [SOLVED] Euro symbol not appearing when formatted to do so
    By liz in forum Excel General
    Replies: 7
    Last Post: 09-12-2005, 06:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1