[Date Index] [Thread Index] [Author Index]
Re: Evaluating notebooks from other notebooks
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.