writes data into a notebook at the current selection, setting the current selection to be just after the data written.
replaces the given cell or box object instead of the current selection.
writes data into a notebook, setting the current selection to be as specified by sel.
writes data into the specified location relative to obj.
Details and Options
- The first argument of NotebookWrite can be a NotebookObject, CellObject, or BoxObject.
- NotebookWrite to a NotebookObject does essentially the same as a Paste operation in the front end: it replaces whatever the current selection in the notebook is by data.
- NotebookWrite to a CellObject or BoxObject replaces the given cell or box with the specified content. If no third argument is specified and the selection is not inside the cell, it does this without disturbing the current selection.
- NotebookLocationSpecifier[obj,location] specifies that the notebook should write data to a location relative to the CellObject or BoxObject obj. Possible settings for location are:
"After" write data after the object "AfterContent" append data to the contents of the object "Before" write data before the object "BeforeContent" prepend data to the contents of the object "On" overwrite the object
- NotebookWrite is the basic way to use the Wolfram Language kernel to modify the contents of notebooks that are being manipulated by the front end.
- NotebookWrite automatically wraps Cell around the data you specify if this is necessary.
- Possible settings for sel are:
After place the current selection immediately after the data written All make the current selection be the data written Before place the current selection immediately before the data written None leave the current selection unchanged Placeholder make the current selection be the first placeholder in the data written
- The default for sel is After, so that NotebookWrite[obj,data] can be called repeatedly to insert several pieces of data in sequence.
Examplesopen allclose all
Wolfram Research (1996), NotebookWrite, Wolfram Language function, https://reference.wolfram.com/language/ref/NotebookWrite.html (updated 2023).
Wolfram Language. 1996. "NotebookWrite." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2023. https://reference.wolfram.com/language/ref/NotebookWrite.html.
Wolfram Language. (1996). NotebookWrite. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NotebookWrite.html