|
Posted by Rik on 12/18/06 22:32
toffee wrote:
> Hi all,
>
> I created a little button which when clicked will run a query on
> mysql db and output the results as an excel spreadsheet.
Really as an Excel spreadsheet or a csv?
> I do this by setting the header as application excel. All works well
> except for a very strange problem. Let's say a column should say
> 16500.22. When I run it here from the uk, the cell will show 16500.22
> When someone in Netherlands runs it, the cells shows 16,500,220,000
>
> It looks like Excel is mixing the commas and dot somewhere along the
> line ?
>
> Anyway know what I can do to keep my colleagues from holland happy ?
Well, it has offcourse got to do with the fact that the dot is the
thousands-seperator, and the comma is the decimal seperator, at least here
in Holland :P.
As far as a Dutch version of Excel is concerned, an number formatted like
16500.22 is gibberish. I would have thought it would choose either to
display is as text, or as 165,000,220 (well, they'd see it as 165.000.220),
but where the extra thousand comes from I wouldn't know.
It offcourse has something to do with locale-settings. I have cracked this
one before, but fortunately for me, unfortunately for you, I'm no longer
forced to deal with MS Office, and I haven't got a clue wether is was Excel
or Windows that had to be pounded into shape.
Afaik when you import a csv instead of opening it just like an Excel
document, one can choose the decimal seperator BTW. Not very user friendely
though.
Either:
- ask on microsoft.public.excel or better yet
microsoft.public.nl.office.excel (as there obviously will be more dutch
aware of this issue)
- create a settings before the output how to format numbers (either in
dutch or reversed :-)
Nothing to do with PHP obviously.
--
Rik Wasmus
Navigation:
[Reply to this message]
|