OWC10 and regional settings

A

akashchopra13

I am using the OWC10 spreadsheet control within a VB.Net windows app,
and programmatically adding formulae to specific cells e.g.

Spreadsheet.Worksheets("Blah").Cells(x,y) = "=PERCENTILE(A1:A10, 0.1)"

This works fine when I am using en-GB culture, but I need the app to
work with other regional settings such as French and German. When I
switch to, for example, fr-FR culture, I get the error message "The
formula you typed contained an error".

Now I think it has something to do with the list separators and decimal
separators for the chosen culture, but can't quite figure it out.

If I use Excel in fr-FR culture it accepts the above formula when
written as "=PERCENTILE(A1:A10;0,1)". However, if I try to
programmatically enter that formula in the OWC10 spreadsheet control, I
get the error.

Can anyone explain what I'm doing wrong?
Thanks
Akash
 
A

Alvin Bruney [Microsoft MVP]

When I
switch to, for example, fr-FR culture, I get the error >message "The
formula you typed contained an error".

i would expect this to happen since french culture is different

I'm going to guess here.
Entering in Excel causes the current culture setting to be read as normal
since excel is setup to read the current culture. If you changed the culture
to french, then a french culture would be read.

However, programmatically entering formulas causes the default culture
setting to be read which should be en-GB. You can test that this is the case
by changing the culture of the application thread to french before loading
the formula programmatically. Or changing the default culture on the target
system [using control panel] to french


--
Regards
Alvin Bruney
[Shameless Author Plug]
The Microsoft Office Web Components Black Book with .NET
available at www.lulu.com/owc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top