-
-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Formulas to Database #283
Comments
This is something I was thinking about requesting. |
You can also write the full path instead of just filename, like #include c:\Users\Ned\Documents\Calcpad\formulas.cpd Then, you will not need to copy the file each time. However, we can consider implementing something like environmental variables, say |
To be honest, I don't like the #include function, since it takes everything inside the file. Because, in my formulas.cpd file, I have maybe 20 common formulas I use. But, for the sheet that I am preparing, I want to "import" only one of them. So, that's why I asked if we can have a injection point to the native database of Calcpad. For example, you can have one file called user_functions in Documents, and any formula that we write there is automatically imported to Calcpad, and we can call those functions natively. It should overwrite any existing functions, if the user mistakenly chooses same function name. |
Hi! But what if I do not want to import them of some worksheet? Or I need only some of them? What saves me to not write: Probably what you need is something like in Python: I also do not understand what is "injection point to the native database of Calcpad". Calcpad native functions are written in c# and they are part of the Calcpad code. Nothing can be "injected" there from outside. |
Include x from y seems like a good solution, in that case. |
Or maybe we can even introduce namespaces like @cser proposed some time ago. Say, we have myfunctions.cpd and inside:
In your main file, then you can write: Namespaces will give you freedom to include one or group of related functions by your choice.
What do your think? |
It might definitely have some use cases to import a bunch of functions. But importing one function has also use cases.
I think namespace might need some work from your side, maybe we can start with importing functions first. |
Hi,
For my usual functions, I created a formulas.cpd, and when I need it, I copy from there.
Is there a better way for this, such as saving my formulas to Calcpad's own database, so I can use them by default?
The text was updated successfully, but these errors were encountered: