Tags:
create new tag
view all tags

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

TWiki version: TWikiRelease04x00x00
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: LINUX RH ES 4
Web server: Apache
Perl version: 5.8.0
Client OS: Windows
Web Browser: Opera, Firefox
Categories: Forms, Search, Javascript

-- KaiMoorfeld - 06 Feb 2006

Answer

ALERT! 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

Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2006-02-07 - PeterThoeny
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.