klaudyu / CalcCraft

have formulas in tables like in excel: a1+a2, sum(), etc.
Apache License 2.0
40 stars 2 forks source link

Need a way to modify decimal levels locally in spreadsheets. #8

Open Exomancer opened 5 months ago

Exomancer commented 5 months ago

There are times I need the default decimal precision and other time I'm doing currency. A local per spreadsheet overide is needed to modify the decimal precision for at least each spreadsheet. I looked in the Github Readme and in the page in Obsidian and unless I'm missing something, other than setting the precision globally there is no way to use high precision and currency precision decimal levels in the same vault.

stalegjelsten commented 1 month ago

Hi! One solution is to use the format function of mathjs: https://mathjs.org/docs/reference/functions/format.html

To round π to 3 digits you could use: =format(3.14159, 3)

To round π to 3 decimal places you could use: =format(3.14159, {notation: 'fixed', precision: 3})