It happens that Kevin N formulated :
> We have legacy code that is about 15 years old and in that entire time
> there never has once been the possibility that 5.80 might be
> interpreted as anything other than a floating-point number in a
> spreadsheet.
What you're talking about is the differences of international settings.
It would be presumptuous to assume MS would also include file
conversion for every possible scenario. Nevertheless, it also is
presumptuous on the part of MS to configure Excel to 'interpret'
numeric input however it feels. Clearly, the 'button' should have
pre-formatted the target cells for the intended data given that Excel's
behavior in this context is the same today as it was 15 years ago when
your program was written.
> Like I said before, to format the numbers before dumping
> would involve altering code in thousands of places over hundreds of
> modules.
Why would you need to format the numbers? It only takes a single line
of code to format a target column. Also, it only takes a single line of
code to 'dump' an entire CSV file into a spreadsheet. As far as your
program is concerned, the CSV file content is text. Why has it taken 15
years for your programmers to learn they can't trust how Excel 'might'
interpret input and so they need to ensure it happens the way they want
it to be interpreted?
> And considering that dots are used as decimal markers by many
> people (USA, UK, and India, for example), it sounds just as much as if
> whoever programmed Excel's CSV parser only did half the job if they
> neglected the possibility that German users of Excel might
> occasionally come across numbers formatted as such.
Perhaps.., since your program is (as you say) 15 years old that it's
time it was updated???<g>
--
Garry
Free usenet access at
http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc