Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to find out country-dependent Format Codes
Hi
I fill cells with date-values via OLE from non office/VB application. If I submit a number and set the NumberFormat of the cell to 'mm/dd/yyyy', it is correctly interpreted...for an english installation. Problem: Switching to a german installation for example will not work. This is because the Format Codes are not understood by Excel. In Germany it is required to format the year as 'JJJJ' and not 'yyyy'. I want to build an international application, which automatically chooses the right characters Could anyone tell me, how I can detect the language/country/locale dependent valid format codes for year, day etc. ? Is it an excel property, or do I have to look in the registry Please help Dirk |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to find out country-dependent Format Codes
Hi Doerk,
Could anyone tell me, how I can detect the language/country/locale dependent valid format codes for year, day etc. ? Is it an excel property, or do I have to look in the registry? look at this thread, esp. the posting from Dianne: http://www.google.at/groups?hl=de&lr....phx.gbl#link3 regards arno |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to find out country-dependent Format Codes
Application.International seems to be what I need
Thanks a lot, arno! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
How to find out country-dependent Format Codes
If you are using the Numberformat, then I believe using the English
formatting characters in VBA should properly format the cell. Stephen Bullen states this in his chapter on International Issues in his Book Excel VBA 2000 programmers reference. "This translation also applies to number formats. Whenever we set a number format within VBA, we can give Excel a format string which uses US characters (such as 'd' for day, 'm' for month and 'y' for year). When applied ot the cell (or style or chart axis), or used in the format() function, Excel translates these characters to the local versions. " There are many international issues, but this doesn't appear to be one of them. -- Regards, Tom Ogilvy "Doerk" wrote in message ... Hi, I fill cells with date-values via OLE from non office/VB application. If I submit a number and set the NumberFormat of the cell to 'mm/dd/yyyy', it is correctly interpreted...for an english installation. Problem: Switching to a german installation for example will not work. This is because the Format Codes are not understood by Excel. In Germany it is required to format the year as 'JJJJ' and not 'yyyy'. I want to build an international application, which automatically chooses the right characters. Could anyone tell me, how I can detect the language/country/locale dependent valid format codes for year, day etc. ? Is it an excel property, or do I have to look in the registry? Please help, Dirk |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
find dependent files | Excel Discussion (Misc queries) | |||
typing 'Up Country' ends up as Up Country' ? | Excel Discussion (Misc queries) | |||
How can I find the alpha numeric codes in excel please,Thank you. | Excel Discussion (Misc queries) | |||
Format the Cell into a telephone number but using country code | Excel Discussion (Misc queries) | |||
find top 25 codes | Excel Worksheet Functions |