Re: Evaluating notebooks from other notebooks
- To: mathgroup at smc.vnet.net
- Subject: [mg86404] Re: Evaluating notebooks from other notebooks
- From: David Reiss <dbreiss at gmail.com>
- Date: Mon, 10 Mar 2008 02:06:15 -0500 (EST)
- References: <firstname.lastname@example.org> <email@example.com>
Self grammar correction! StringReplace[ previous post, "it's" -> "its"] I certainly know better and Stephen Luttrell reminded me that I do know better (he cited precious things that I've written). But I posted **very** late... :-) --David On Mar 9, 6:05=A0am, David Reiss <dbre... at gmail.com> wrote: > One of the ways of doing this is to open the notebook with the Option > Visible->False, execute it's cells, and then close the notebook. > > Here is an example (of course use your own path to the file in > question): > > file = "/Users/dreiss/Desktop/test.nb"; > > nb = NotebookOpen[file, Visible -> False]; > > SelectionMove[nb, All, Notebook]; > > SelectionEvaluate[nb]; > > NotebookClose[nb]; > > If you want to save the notebook then you will need to do a bit more, > ultimately using the function Export. > > I hope this helps... > > --David > A WorkLife FrameWork > E x t e n d i n g MATHEMATICA's Reach...http://scientificarts.com/worklife= / > > On Mar 8, 5:44=A0am, ag <ashutoshgupta.... at gmail.com> wrote: > > > Hi, > > I was wondering if it is possible to evaluate a notebook, say > > "xyz.nb" (without loading it in the front end), from another notebook > > (say "root.nb") using some command like: > > > EvaluateNotebook["xyz.nb", path] > > > TIA, > > Ashutosh. > > PS: I am using Mathematica 6.0.1.