Question
I have a quite big preadsheet which does lots of calculations using included webs. I am also calculating some values within the preadsheet which I would like to use in other topics and outside twiki.
My question is two folded:.
1. How can I parse a value which I defined with CALC Set to another topic without including the whole parent topic.
2. Is it possible to write out the values I set with CALC Set to a file?
Environment
--
KaiMoorfeld - 06 Feb 2006
Answer
If you answer a question - or someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is below the edit box.
SpreadSheetPlugin variables live within the context of the viewed topic (including included topics). That is, if you want to use resulting variables in topic A elsewhere you have to include the whole topic A.
If you show all included topics and the resulting variables in topic A, but show only the resulting variables in topic B, you can create a supporting topic C that does all the calc you need, then include that in topic A and B.
If you want to save the variable values you need to do that externally (e.g. with WWW::Mechanize, see
HowtoAddTopicsRemotely), or create a small Plugin that saves the values internally in a topic.
--
PeterThoeny - 06 Feb 2006
Thanks for the reply.
That is what I figured.
I sloved it by extending the options in the
SpreadSheetPlugin by a new SET function called SETF which not only sets the variable but also writes it out to a file with the filename of $name and acceptes the path as a additional parameter.
--
KaiMoorfeld - 07 Feb 2006
That works, but please note that specifying a filepath/name in a TWiki topic can be a security issue.
--
PeterThoeny - 07 Feb 2006