Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / October 2008

Tip: Looking for answers? Try searching our database.

Bug or feature?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Leo Mazzi - 09 Oct 2008 09:45 GMT
I was wandering if this is a bug (so it will be fixed) or a feature (so I can
expect the same behavior in the following versions)...

Excel uses in many cell formulas the regional settings list separator
character to separate between parameters (example for GB the list separator
is "," so an IF formula would look as: "=IF(bool, true, false)" but when you
change the country to DE then the separator is ";" and you have to use the
formula in the way: "=IF(bool; true; false)".

Now this would not be a problem if Excel would not use the DEFAULT regional
configuration so if any user customizes his regional settings to have a
different separator than the default - Excel (tested with Excel 2003)
currently ignores it - so for example: the user selected in GB the ";" as a
separator - but Excel still thinks that the separator is ",".

Is this a BUG or a feature? Does anyone know about this?
Thomas [PBD] - 09 Oct 2008 13:19 GMT
Leo,

I tried to duplicate your issue.  By doing so I went to Control
Panel>Regional and Language Settings> Changed from English to German.
It did change the , to ; as you said.  When I saved the application, closed,
changed my settings back to English, the ; returned to , as it should.  I
could not get the program to ignore the ;.  Have you ensured that your
regional settings are set to where you want them?

Signature

--Thomas [PBD]
Working hard to make working easy.
Answered your question? Click ''Yes'' below.

> I was wandering if this is a bug (so it will be fixed) or a feature (so I can
> expect the same behavior in the following versions)...
[quoted text clipped - 12 lines]
>
> Is this a BUG or a feature? Does anyone know about this?
Leo Mazzi - 09 Oct 2008 15:51 GMT
As I said, the problem is visible when you go and change the defult value -
so let's say you set it to GB - you have there the default delimiter ",". Now
go and customize this by changing this value to ";". In that case Excel will
ignore your change - so Excel is (at least for any PC I went on checking)
ignoring my customization. This is a problem to me because I have to fill in
programatically some formulas and I came upon some customers having this
customized.

If you only change the country then Excel reacts promptly and changes the
delimiter also for all open onscreen documents.

So if this is a feature or a BUG is an info I would really need to react
propperly.

Is there maybe a way of detecting which is the delimiter that Excel will use
by asking Excel (so without the need of checking the regional settings)?

Best regards,
   Leo

> Leo,
>
[quoted text clipped - 4 lines]
> could not get the program to ignore the ;.  Have you ensured that your
> regional settings are set to where you want them?
Ron Rosenfeld - 09 Oct 2008 17:39 GMT
>Is there maybe a way of detecting which is the delimiter that Excel will use
>by asking Excel (so without the need of checking the regional settings)?

application.International(xllistseparator)
--ron
Leo Mazzi - 10 Oct 2008 10:15 GMT
thank you for the tip. I actually generate the output from C# code so my
solution would be:

string listSeparator = (string) Application.get_International(0x00000005);

I use the hardcoded value for xlListSeparator because seems that there is no
representation of it in the Excel.Constants enum.

> >Is there maybe a way of detecting which is the delimiter that Excel will use
> >by asking Excel (so without the need of checking the regional settings)?
>
> application.International(xllistseparator)
> --ron
Ron Rosenfeld - 10 Oct 2008 11:23 GMT
>thank you for the tip. I actually generate the output from C# code so my
>solution would be:
[quoted text clipped - 3 lines]
>I use the hardcoded value for xlListSeparator because seems that there is no
>representation of it in the Excel.Constants enum.

Glad to help.

Thanks for the feedback.
--ron
Thomas [PBD] - 09 Oct 2008 18:13 GMT
Leo,

I guess you have to check two places to ensure that the List Separator is
enabled as a comma.  First place, one that I am pretty sure you have checked:
Start>Settings>Control Panel>Regional and Language
Options>Country>Customize>Number>List Separator.  The second place, inside of
Excel itself: Tools>Options>International>Use System Separators Checkbox.  
Thirdly, you can reference this page for additional information on setting
the computer registry.

http://geekswithblogs.net/robz/archive/2008/07/09/windows-xp-hack-how-to-use-a-p
ipe-quotquot-delimiter.aspx


Signature

--Thomas [PBD]
Working hard to make working easy.
Answered your question? Click ''Yes'' below.

> As I said, the problem is visible when you go and change the defult value -
> so let's say you set it to GB - you have there the default delimiter ",". Now
[quoted text clipped - 24 lines]
> > could not get the program to ignore the ;.  Have you ensured that your
> > regional settings are set to where you want them?
Leo Mazzi - 10 Oct 2008 10:18 GMT
Thanks Thomas but I do the fill in programatically without the possibility to
go trough the GUI interface. Actually Ron's solution gave me a good tip how
to do it in a fast way (one line of code).

in addition Options>Country>Customize>Number>List Separator defines the
decimal and the thousands separators not the list separator.

best regards,
  Leo

> Leo,
>
[quoted text clipped - 36 lines]
> > > could not get the program to ignore the ;.  Have you ensured that your
> > > regional settings are set to where you want them?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.