Hello, after loading the data from the Database the format of my data (currency table) comes in decimal, i wish in the handsontable colum to format the the data instead of a americal/dollar currency to a european (euro). Since in europe we use comma to separate the decimal instead the dots like in america.
After Loading format currency
You need to set the column’s language, as per https://docs.handsontable.com/Options.html#language. This will control both the currency symbol and the format of a number’s thousands & decimal point character.
Note that the library has just changed, as of Hot 0.26.0. You need to ensure you have the right library for whichever version of Hot you are using. (And only last week, at 0.25.x, I configured for using numericjs as it was, sigh … ).
Hi @geral
I was just composing my reply when @jon came and posted his reply (thanks @jon I agree with everything you wrote)
Here’s an additional example from our docs for the euro: http://jsfiddle.net/nu8u81kc/ …
and yes - we’re currently working on Numbro as it solves some issues we were talking about and guys who are working on it are still there - active and very helpful.
@aleksandra_budnik
I can’t believe it : I spent just last Friday working to get my code release to include numericjs’s language files — and wrote code to set the default language other than en-US if appropriate — with Hot 0.25.x, now I’ll need to get 0.26 and update… Grrrrr
I may have a problem here. I have to use RuleJS with Hot for formulas. I already found that numericjs code is embedded in the full versions of both Handsontable & RuleJS js files which I include. This led to there being 2 instances of numericjs accessed, depending on the context of where code was called, and (for example) I had to set the default language in both instances. Now I assume you have changed the handsontable full js file to use numbro instead, but you will not have changed RuleJS. According to me, that will mean some code accesses numbro now but some accesses the old numericjs … ???
I can understand why it’s unplesent news about the numbro @jon but I have good news also… I was told that the formulas were taken by one of our best developers and the plugin (yes, not another library to handle) should be ready before the end of July. It’s a huge change but we’re closed to the goal day by day
the RuleJS uses old verion of Handsontable (with numerlJS).
@aleksandra_budnik
If you recall from my earlier posts, I use RuleJS at whatever version it was last at, but handsontable at the latest version (required for all sorts of things, not acceptable to use handsontable 0.14.x as it was).
I do not think you appreciate the ramifications of this, with regard to your change in Hot 0.26 from numeraljs to numbrojs, and what I said about there being 2 instances. Anyone currently using handsontable formulas who uses the 0.26 handsontable with RuleJS will find they are half using numericjs and half using numbrojs, and they will not even know which one is being used, as it depends on the context of where a method is called — both will be in use in different places…
Yes, unfortunately it’s truth @jon
That’s why we do our best to deliver working formulas as a plugin as soon as possible. It will solve the compatibility issues once and for all. We could switch to numbro after formulas appearance but for our current schedule it would be too late.
So you are saying you will deliver “working” formulas which will (continue to) use numeraljs, to work with current handsontable which now uses numbrojs??
we will deliver working formulas compatible with numbro and anything else in the Handsontable.
@aleksandra_budnik
OK then, since Handsontable release 0.26.0 breaks compatibility with existing RuleJS for any formula support, are you able to give some indication of just when you anticipate being able “to deliver working formulas as a plugin as soon as possible”? I realise any date will not be a promise, but I would really appreciate something indicative. Thank you in advance.
Hi @jon
@budnix released today a formula-parser https://github.com/handsontable/formula-parser so as you can see by the readme file - the work is really moving forward very fast.
Our dead-line is ‘till the end of July’ and we do not set a precise date yet as the most important thing is not to make it but to make it work.
I left myself a note to inform you when we’ll do any bigger step toward our goal.
@aleksandra_budnik
Thank you for this indication. “End of July” is sooner than I had expected, so that is welcome. Agree formulas need to work, because current one has too many bugs! Best of luck.
Hi @jon
not everything that we’ve spoken is already added to formulas but I was curious did you already had a moment to check them? Docs at https://docs.handsontable.com/pro/1.7.3/demo-formula-support.html
@aleksandra_budnik
Hello Alek,
I have tried having a look at the documentation link:
The documentation no longer allows me to select to go into “FREE” instead of “PRO” from Internet Explorer 11 (the dropdown does not drop down). [EDIT: This now seems to be working from IE 11, for whatever reason.]
I am most concerned to see (from Firefox) that formula support now appears to have moved from both versions into PRO-only. I initially adopted Handsontable (Free) as a client-side spreadsheet solution in good faith, understanding it to be an “Excel-like spreadsheet” as your advertising prominently claimed.
I have committed a lot of work to making Hot work, dealing with its large amount of bugs in the spirit of free software, which I would not have expected in a paid product. I was most surprised and disappointed to discover that its formula support (with Rule.js) turned out to be “experimental”, especially given that it has been available for so long. Without formula support, Handsontable may be a “table provider”, but it is not a “spreadsheet” — can you name any other “spreadsheet” product in the world which does not have formulas? In your documentation’s Typical use cases topic, for example, how could any of the items listed there be accomplished in the Free version if it does not have formulas?
I have been awaiting the “rewrite” just to provide basic formula support which actually works. (I can only conclude that most of your existing users do not use formulas, because as it has stood under Rule.js they simply do not work well enough to be used in practice; see my various posts for basic bug workarounds.) All my work will be wasted if you are not planning to have the Free version as a spreadsheet.
So, could you kindly clarify the situation wrt the Free version and forthcoming formula support, please?
Hi @jon
That is true, we decided to deliver formulas as a plugin only for Handsontable PRO. Still you can use the Handsontable FREE (Community Edition) + Rule.js without any barriers. We thought that we have spend a lot of time, testing and developing to add the feature as a PRO (currently in alpha version as there is some more work to do to call it a stable version). I think that you have send so much work in creating a bug-less project that it won’t even be fully compatible with Handsontable PRO formulas but you are still able to use Rule.js for free so your work won’t be wasted. Even if we would decide to abandon Rule.js you are still allowed to use latest version of the software.
What is still an advantage of Handsontable (free as well) is the fact that you can load and change data whenever you want and you can respond to data typed by user. You can also create custom functions based on our callbacks (like beforeChange
/afterChange
) to perform calculations and load their results into table (getDataAtCell
/setDataAtCell
/loadData
). So basically a lot of formula calculations can be also possible via current callback/method set but with lot more work and that is why the FREE version can be called a spreadsheet as well.
When it comes to your project I’d be more than happy to help with anything. The only imitation can be the fact that Rule.js is using the old version of Handsontable where a lot of bugs were still affecting calculations. However as I wrote in the previous paragraph some basic formulas can be performed via existing methods. The example can be a SUM
formula which can be overwritten by a FOR
loop calling defined cells via getDataAtCell()
.
I do not want to say that all the formulas can be replaced cause it was really a lot of work to translate formulas from Rule.js to a plugin, then fix some bugs to make it work with the newest version (which is why the Rule.js is still working with Handsontable 0.14.0) and other plugins. But what I do want to say is that your project won’t be harmed by the new changes it can only face one closed door (which is buying a PRO license) if you would like to use upgraded formulas as a plugin.
I think you misapprehend the fundamental problem with the current/old formulas. I have no problem with the “computations” like SUM()
, they work. What does not work is the fundamental ability to access a cell’s value from some other cell, i.e. the absolute basic ability to do any calculations of any nature at all in Hot correctly.
It is unclear whether the issues lie in Rule.js itself or rather in Hot’s code which attempts to allow for cells having formulas and accessing other cells. I suspect it may well be a Hot-only issue, not really Rule.js, which is why I eagerly awaited new Hot code which could actually do formulas correctly at all.
I have previously drawn your attention to posts like:
http://stackoverflow.com/questions/35304247/handsontable-formula-field-retrieval-issue
http://jsfiddle.net/71o23gp0/8/
https://jsfiddle.net/76z48m98/3/
These are only a few of the posts on the web which draw attention to the fact that Hot formulas have never worked correctly. They may work in some simple cases, by chance, but they consistently go wrong in a completely unpredictable way which depends on where the cells are which reference other cells, e.g. it may depend on whether the referencing cell comes before or after the referenced cell in the order in which Hot happens to be rendering cells, but it’s all over the place.
You will see I posted an extensive change to handsontable.formula.js
, as per http://stackoverflow.com/a/35865132/489865 and http://jsfiddle.net/ufL1vts5/ Without at least these changes Hot formulas have always been too buggy to use. However, I did not claim I knew exactly what I was doing, and while that has solved the bugs in the examples I mention, I am still faced with incorrect results, depending on what the user happens to enter into the cells and where they are relative to each other.
- If you choose to fix these basic problems, are you saying I will still be able to take a future latest version with fixes and use it with Hot
formulas
setting and Rule.js support? - If so, I tried to explain above that “Handsontable release 0.26.0 breaks compatibility with existing RuleJS for any formula support”.
- I see that
http://docs.handsontable.com/0.28.3/tutorial-features.html
has “Formula support” in the Free Features, but it leads to a 404 Not found. If you are removing the ability for Free users to use formulas from now onward, will you be amending the description of Hot so as not to claim that the Free version acts as a “spreadsheet”?
Hi @jon
Thank you for bringing all of the issues together. Most of them are really serious and I think that this post should be a must-check for our devs. I would like you to know that I’m really grateful for all the work you did to point all the issues.
I’ve just tested your demo: http://jsfiddle.net/ufL1vts5/ with the new plugin instead of Rule.js and in the plugin the first table (working well in Rule.js) doesn’t show expected values http://jsfiddle.net/s1tox549/ (ps. I’ve also reported this bug in our internal ticketing system). The same is with the second table: http://jsfiddle.net/1sazc9b4/
That’s why we can easily say that the current formula plugin is not ready to be called a working plugin (it’s marked as alpha). And I surely agree that those are bugs that can relate to all calculations so they have to be fixed and treated with highest priority - still those will be only fixed in the plugin - not in the Rule.js. Currently we do not have any plans to update Rule.js and/or make it compatible with newer version of Handsontable.
ps. thanks for pointing the 404. Although I do not think that we should not use the spreadsheet
as a term, as Handsontable is a front-end shell that is prepared to correspond to all back-end calculations and formulas (provided by any way) is something added beyond the proper handling of calculations.
Hello @aleksandra_budnik
I suspect that those bugs, and other similar ones, still show up in new plugin because they never had anything to do with Rule.js itself. Rather they are faults in the logic in handsontable.formula.js
, possibly together with the way rendering is handled in handsontable.full.js
.
So I am highly disappointed to learn of your intention not to supply workable formulas with the free version of Handsontable. The last free version of Hot with which Rule.js was supposed to work was 0.14.0, released in April 2015. There were so many bugs and missing features, which later versions have since addressed, that for my part I could not go back to using that.
As supplied now, and for the future, the free version will not come with any formula support which allows Hot to be used as “an Excel-like spreadsheet”. I guess we will have to agree to differ that
formula calculations can be also possible via current callback/method set but with lot more work
constitutes what most people would consider to be a “spreadsheet”.
I do not mean to be rude or disrespectful to your work. You have answered my questions here kindly and helpfully for the free version. But unless I can persuade you & your team to reconsider lack of formula support in the free version — even if it’s just making handsontable.rule.js
work correctly when using Rule.js, since your plugin’s advanced features are not required — IMHO you are making a poor decision. Having a quite fundamental feature available in free software, telling people that it will be updated to work properly, and then deciding to move that feature into the paid version only, gives free software a bad reputation. Certainly I would never have adopted Hot, and put in all the work I did, had I known that the current, free version would not come with in-built calculations. If there is any leeway for you people to think again over formula support I would most politely urge you to do so.
Thank you for your time.