Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Locale issue with union operator string (,)

The Excel union operator string is different for different locales (e.g. the
semicolon ";" in France and the comma "," in the US). I want to read out
Excel Ranges using A1-style notation using the union operator, e.g.

Excel.Range myRange = get_Range("A1,A2,A3", missing);

Thus I have to consider locales when assembling my cell references string.
Although when using VSTO 2008 the locale issue should be hidden behind
wrapper objects when accessing the COM interface, this doesn't seem to be
true when using the union operator inside String cell references. My
operating system being Swiss German for instance does not accept "A1,A2,A3"
as an input but only accepts "A1;A2;A3".

Is it safe to read out
System.Globalization.CultureInfo.CurrentCulture.Te xtInfo.ListSeparator to
find the union operator? Or is this unsafe since another Excel Add-In might
actually temporarily change the current locale? Or is there any better way
to find out how to assemble my cell references String? I prefer not using
the Application.Union method, because in my case this would probably result
in accessing the COM interface repeatedly, whereas through building a cell
references String I could save a lot of calls to this interface.

Greetz
Fabz


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Locale issue with union operator string (,)


I don't pretend to understand your question, but that's my ignorance,
however, within the Excel Application might it help to look at the likes
of

Application.International(xlAlternateArraySeparato r)
Application.International(xlColumnSeparator)
Application.International(xlListSeparator)
Application.International(xlRowSeparator)

whose values a

xlAlternateArraySeparator 16
xlColumnSeparator 14
xlDecimalSeparator 3
xlListSeparator 5
xlRowSeparator 15

Also, might it help to use:

Application.UseSystemSeparators = False/True?




Fabz;697761 Wrote:

The Excel union operator string is different for different locales
(e.g. the
semicolon ";" in France and the comma "," in the US). I want to read

out
Excel Ranges using A1-style notation using the union operator, e.g.

Excel.Range myRange = get_Range("A1,A2,A3", missing);

Thus I have to consider locales when assembling my cell references

string.
Although when using VSTO 2008 the locale issue should be hidden behind
wrapper objects when accessing the COM interface, this doesn't seem to

be
true when using the union operator inside String cell references. My
operating system being Swiss German for instance does not accept

"A1,A2,A3"
as an input but only accepts "A1;A2;A3".

Is it safe to read out
System.Globalization.CultureInfo.CurrentCulture.Te xtInfo.ListSeparator

to
find the union operator? Or is this unsafe since another Excel Add-In

might
actually temporarily change the current locale? Or is there any better

way
to find out how to assemble my cell references String? I prefer not

using
the Application.Union method, because in my case this would probably

result
in accessing the COM interface repeatedly, whereas through building a

cell
references String I could save a lot of calls to this interface.

Greetz
Fabz



--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?u=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=195152

http://www.thecodecage.com/forumz

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use union reference operator? JoeU2004 Excel Discussion (Misc queries) 4 May 18th 09 04:37 PM
colon as an operator (used twice in a string) tman Excel Discussion (Misc queries) 5 December 21st 07 06:50 PM
Why doesnt union reference operator work with COUNTIF? joeu2004 Excel Discussion (Misc queries) 1 September 15th 07 09:59 AM
Locale issue Why Tea Excel Programming 6 December 21st 06 07:23 AM
Excel's range Union operator in WORKDAY function gives #VALUE!. Rod Morrell Excel Programming 0 October 9th 03 02:59 PM


All times are GMT +1. The time now is 10:10 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"