MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Evaluating notebooks from other notebooks

  • To: mathgroup at
  • Subject: [mg86370] Re: Evaluating notebooks from other notebooks
  • From: David Reiss <dbreiss at>
  • Date: Sun, 9 Mar 2008 05:06:20 -0500 (EST)
  • References: <fqtqme$d7q$>

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

file = "/Users/dreiss/Desktop/test.nb";

nb = NotebookOpen[file, Visible -> False];

SelectionMove[nb, All, Notebook];



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...

A WorkLife FrameWork
E x t e n d i n g MATHEMATICA's Reach...

On Mar 8, 5:44=A0am, ag <ashutoshgupta.... at> 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.

  • Prev by Date: Re: Troubling Bug involving RandomReal, NestList, and Table
  • Next by Date: Re: Re: Apply function to parts of a list
  • Previous by thread: Evaluating notebooks from other notebooks
  • Next by thread: Re: Evaluating notebooks from other notebooks