German numbers copy&paste JTable->Excel problem

hi audience,

this is the problem given:

German numbers ars comma delimitered and their thousends and hundreds are dot separated... quite the opposite to the English:-)

I can archive this display in a JTable using the NumberFormat

NumberFormat.getNumberInstance(Locale.GERMAN));

If I use the system's copy &paste functionality (ctrl-c & ctrl-v), to copy the JTable contents to MS Excel (German edition, uses comma delimiters & dot separators), the delimiters are ignored ... eg. 2.736,39 (ie: twothousendsevenhundredthirtysix dot thirtynine) turns into 273639...

Do you have any ideas?

Thanks in advance!!!

astiedl

ps: using 1.5 and WinXP

[712 byte] By [astiedla] at [2007-10-2 17:32:43]
# 1
Over-ride the default system behaviour.Listen to keyboard events (Ctrl-C) on your JTable and fill the clipboard using custom-code.
ordinary_guya at 2007-7-13 18:49:47 > top of Java-index,Desktop,I18N...
# 2
> the delimiters are ignored ... eg. 2.736,39 (ie: > twothousendsevenhundredthirtysix dot thirtynine) turns into 273639...Isn't this just what it should do? It should be up to MS Excel to displaythe resulting number it whatever way you have told it to.
pbrockway2a at 2007-7-13 18:49:47 > top of Java-index,Desktop,I18N...
# 3
> Over-ride the default system behaviour.> > Listen to keyboard events (Ctrl-C) on your JTable and> fill the clipboard using custom-code.Thank you! I will try that one!
astiedla at 2007-7-13 18:49:47 > top of Java-index,Desktop,I18N...
# 4
Actually, pbrockway's post makes more sense.
ordinary_guya at 2007-7-13 18:49:47 > top of Java-index,Desktop,I18N...
# 5

well, my excel is told to display numbers the "German way"...

If I paste the data to a plain text editor, it comes out with the dot-delimitered number... but I need the comma!!!

I can hardly tell my customer to switch excel number options to English number format, paste the data and then switch back to German number format...

astiedla at 2007-7-13 18:49:47 > top of Java-index,Desktop,I18N...
# 6
Tell your customers to use the data import function instead of directly copying and pasting into Excel. That gives them an opportunity to specify how to interpret numbers (under Advanced).
one_danea at 2007-7-13 18:49:47 > top of Java-index,Desktop,I18N...