Mathematica > Notebooks and Documents > Low-Level Notebook Programming >

NotebookRead

NotebookRead[notebook]
gives the expression corresponding to the current selection in the specified notebook object.
  • NotebookRead is the basic way to get into the kernel pieces of notebooks that are being manipulated by the front end.
This creates a document notebook:
In[1]:=
Click for copyable input
Out[1]=
This selects the first cell:
This reads the cell and returns its Cell expression:
In[3]:=
Click for copyable input
Out[3]=
New in 3
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team