# Wolfram Mathematica

## Notebook Document Processing

Since Version 3, notebooks have been saved as symbolic expressions that can easily be loaded and processed into the Wolfram Language, but doing so requires a significant understanding of the notebook's symbolic representation. NotebookImport clears that hurdle by making it simple to pull text, graphics, and code from notebooks.

Import all "Notes"-styled cells found in the documentation for Cos, convert them to plain text strings, and return them in a nicely formatted table.

show complete Wolfram Language input
In:= ```docNotebook = FileNameJoin[{\$InstallationDirectory, "Documentation", "English", "System", "ReferencePages", "Symbols", "Cos.nb"}]; makeGrid[data_] := Grid[List /@ data, Alignment -> Left, Dividers -> All, Spacings -> {1, 1}, Background -> {None, {{Lighter[ Blend[{Gray, Hue[RandomReal[], .8, 1]}, {.4, .6}], .8], White}}}]```
In:= `makeGrid[Text /@ NotebookImport[docNotebook, "Notes" -> "Text"]]`
Out= Samples of all extracted inputs.

In:= `makeGrid[Take[NotebookImport[docNotebook, "Input"], 9]]`
Out= Show the inputs in "InactiveExpression" form.

In:= ```makeGrid[Take[ NotebookImport[docNotebook, "Input" -> "InactiveExpression"], 9]]```
Out= Samples of all the graphical outputs.

In:= ```Take[Cases[ NotebookImport[docNotebook, "Output"], _Graphics | _Image | _Graphics3D], 4]```
Out= Samples of all extracted example texts.

In:= ```makeGrid[Take[NotebookImport[docNotebook, "ExampleText" -> "Text"], 9]]```
Out= 