Hello Andrew,
I've just run this mini test program:

val = 112456.678
Print val
Print FormatNumber(val,2)

and this is the result, on a German Windows 2000 machine:

112456,678 
112.456,68

so the formatting with and without FormatNumber does reflect the national 
language settings for decimal and thousands separators. This should normally 
not be a problem in CSV files if they are then opened with an application on 
the same machine (like Excel), or on one with the same language settings. But 
for obvious reasons you can't use the comma as a field separator unless you put 
the numbers in quotes. 
Kind regards
Thomas

Am 06.12.2009 um 07:11AM schrieb rmrsoft:

> Interestingly I have only ever used a plain FORMATNUMBER(Val,2) command in my 
> export routines and although my programs are used all over the world I have 
> never had a single case reported of a CSV file not loading. 
> 
> Might be worth running a test case on a German machine ?
> 
> Al
> 
> --- In nsbasic...@yahoogroups.com, Andrew Thomas <andrewmarktho...@...> wrote:
> >
> > Hi,
> > 
> > Thank you very much. I was hoping for a simple single line command but 
> > there seems not to be one. I'll use your method as it sounds a reliable way 
> > to do it.
> > 
> > Many thanks,
> > 
> > Andrew.
> > 
> > 
> > 
> > 
> > -----Original Message-----
> > From: Hannes Streicher <hstreic...@...>
> > Sent: 05 December 2009 11:59
> > To: Andrew Thomas <nsbasic...@yahoogroups.com>
> > Subject: Re: [nsbasic-ce] Decimal points
> > 
> > Guten Tag Andrew Thomas,
> > 
> > am Samstag, 5. Dezember 2009 um 12:46 schrieben Sie:
> > 
> > 
> > 
> > > Can I ask if anyone knows how to make writing numbers to files
> > > always have a decimal point as the decimal separator? It seems that
> > > some regional settings use a comma, which plays havoc with csv files.
> > 
> > i am german , we use commas :(
> > 
> > i usually end up adding in a function exchanging the comma with a
> > point (stringreplace)
> > 
> > 
> > 
> > -- 
> > Mit freundlichen GrĂ¼ssen
> > Hannes Streicher
> >
> 
> 

--

You received this message because you are subscribed to the Google Groups 
"nsb-ce" group.
To post to this group, send email to nsb...@googlegroups.com.
To unsubscribe from this group, send email to 
nsb-ce+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/nsb-ce?hl=en.


Reply via email to