This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Documentation / Mathematica / Add-ons & Links / AuthorTools / Function Interface /

Extracting Cells from a Notebook

This section assumes that you have already loaded the AuthorTools package and set the variable nb to represent the notebook you wish to process. (See Using Functions to see how to do this.)

This exports all cells of Section style to a notebook.

In[3]:=

Out[3]=

You can also extract all Section cells by specifying a list of two elements as the second argument. ExportNotebook[nb1, {"CellStyle", "Section"}, "Notebook"] is equivalent to ExportNotebook[nb1, "Section" "Notebook"].

In[4]:=

Out[4]=

This command exports all cell groups in which the heading cell is an input cell. This enables you, for example, to extract all input-output pairs in a notebook.

In[5]:=

Out[5]=

This command exports all cells having the cell tag "Reference1".

In[6]:=

Out[6]=

This command exports all graphics cells as separate GIF files.

In[7]:=

Out[7]=