Hi.

I was wondering if it is possible to change decimal and thousands separator to work in European way.

  • Change decimal separator from dot to komma.
  • Change thousands separator from komma to dot.

I guess it is possible to tweak a settings file somewhere manually. But I would like to suggest a sheetnode setting. Any hints on which files to edit, if I wan't to do this manually?

I am actually not sure about the "Component" in the "Project information".

Thanks.

CommentFileSizeAuthor
#2 format-tab-missing.jpg76.87 KBgrn
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

infojunkie’s picture

Category: feature » support

The "Format" tab allows you to change number formatting. If you can't find a preset format that works for you, you should be able to specify your own, using a syntax similar to Excel. Can you please try it and let me know?

grn’s picture

FileSize
76.87 KB

Hi infojunkie. Thanks for the reply. Sorry for the late answer, but the mail notifications aren't working periodically.

I should have mentioned that this is only an issue when importing from Excel.

I can't change the format in some cells. Don't know if it's an WikiCalc or Sheetnode issue.

Try for example cell "G39" at this demo: http://grn.dk/demo/drupalsheet/node/6/edit

I also attached a screenshot that displays the issue.

infojunkie’s picture

I'll take at look at this when I get back from vacation after June 19th. Thanks for your patience!

grn’s picture

Thanks. This has not high priority at the moment.

Pomliane’s picture

As many have said it before: thank you very much for this amazing module Infojunkie! :)

Change thousands separator from comma to dot / change decimal separator from dot to comma:
The "Format" tab allows to change number formatting but, even with custom formats it seems you have to use a dot to specify decimal position...

#,##0.00 -> 9,999.90
# ##0.00 -> 9 999.90
# ##0,00 -> 9 99,990
#.##0,00 -> 999990.0,00

Have I missed something?

Related to that: is there a way to change/choose your decimal input format (ie commas taken into account instead of dots when editing a sheet) diretcly in Sheetnode or in combination with another module?

Thanks in advance.

infojunkie’s picture

Category: support » bug

Re #5: I haven't gotten around to testing this, but it looks like a bug in the formatting code.

Regarding your second question, do you mean selecting a *default* decimal format? In that case, no there's isn't but that's a good feature request. Please open a new issue and clearly explain the scenario you have in mind. Thanks!

RAguilar’s picture

You need to edit sheetnode/socialcalc/socialcalcconstants.js and change
FormatNumber_separatorchar: "." to "," and
FormatNumber_decimalchar: "," to "."
It worked for me only when viewing the sheet.

Anyway, if I write a number it's formatted by the old rule, I think this might be due the regexp rules in SocialCalc.DetermineValueType function in socialcalc-3.js.

infojunkie’s picture

Issue tags: +sheetnode-6.x-1.6

Tagging for next release.

RAguilar’s picture

Another change:
else if (ch==",") { // decimal point
to
else if (ch==".") { // decimal point
and
else if (ch==".") {
to
else if (ch==",") {
in formatnumber2.js

grn’s picture

Great, thanks!

infojunkie’s picture

Version: 6.x-1.4 » 7.x-1.x-dev
Issue summary: View changes
Issue tags: -sheetnode-6.x-1.6

Moving to D7 for fixing.

willhallonline’s picture

Status: Active » Closed (works as designed)

You can change the formatting, but it needs to be done in the library (SocialCalc) rather than in the module.

grn’s picture

Great, thanks for the info!