save localization in an excel file

  • Thread starter Thread starter monsieur.marco
  • Start date Start date
M

monsieur.marco

Hi all,

Does anybody know how to save localization in an excel workbook (C#
1.1)? I'm not sure this is possible, but I'm trying to do this so that
numberColumns keep their format no matter what local is set in the
computer where the file is opened.

Thanks in advance,

Swayze
 
As you can see, a localized piece of data in english is entirely different
from japanese so it's not really feasible to store it localized for every
locale.

What you want is to save it in a neutral format and then determine what
locale the request is requesting from, then use that requestor information
to format the data appropriately for the user.


--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
 
Alvin,

I agree with you, but, I'm just trying to get excel NOT to autoformat.

I guess I didn;t explain myself properly;

We are generating excel files through code, so for easy viewing, these
files need to be formated. this is no problem. my problem is that I
have columns that hold prices. We want these columns to hold display
using "american" format. "#,###.##". the problem is that excel, when it
opens the file, it looks at the users local and formats these columns
accordingly. So for my users, who have their locals set to Turkish, all
prices display as "#,###,##" using a coma as the decimal instead of a
period.

I had heard or read somewhere that I could save the localization in the
file. I have since found out that this is not realy possible.

So now I guess I have a new question; how can I stop excel from
autoformating columns. I have tried to reset all values as text
(setting the value of the cells with a string), but excel still
autoformats according to the users local.


As you can see, a localized piece of data in english is entirely different
from japanese so it's not really feasible to store it localized for every
locale.

What you want is to save it in a neutral format and then determine what
locale the request is requesting from, then use that requestor information
to format the data appropriately for the user.


--
________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------


Hi all,

Does anybody know how to save localization in an excel workbook (C#
1.1)? I'm not sure this is possible, but I'm trying to do this so that
numberColumns keep their format no matter what local is set in the
computer where the file is opened.

Thanks in advance,

Swayze
 

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

Back
Top