Skip to main content
added 12 characters in body
Source Link
Ghersic
  • 1.2k
  • 7
  • 21

Alternatively, remove all inputs entirely: (CAUTION)

Copy-pasting the entire notebook to another, new notebook, then pasting the following in it will delete all input cells rather than minimizing them, such that you could send it to someone if you only wanted them to have the output:

Module[{nb},
 nb = EvaluationNotebook[];
 NotebookFind[EvaluationNotebook[], "Input", All, CellStyle];
 NotebookDelete[nb]]

Though, be careful with this method as it deletes all input cells (including itself) in the respective notebook.

Alternatively, remove all inputs entirely:

Copy-pasting the entire notebook to another, new notebook, then pasting the following in it will delete all input cells rather than minimizing them, such that you could send it to someone if you only wanted them to have the output:

Module[{nb},
 nb = EvaluationNotebook[];
 NotebookFind[EvaluationNotebook[], "Input", All, CellStyle];
 NotebookDelete[nb]]

Though, be careful with this method as it deletes all input cells (including itself) in the respective notebook.

Alternatively, remove all inputs entirely: (CAUTION)

Copy-pasting the entire notebook to another, new notebook, then pasting the following in it will delete all input cells rather than minimizing them, such that you could send it to someone if you only wanted them to have the output:

Module[{nb},
 nb = EvaluationNotebook[];
 NotebookFind[EvaluationNotebook[], "Input", All, CellStyle];
 NotebookDelete[nb]]

Though, be careful with this method as it deletes all input cells (including itself) in the respective notebook.

deleted 35 characters in body
Source Link
Ghersic
  • 1.2k
  • 7
  • 21

Alternatively, remove all inputs entirely:

Copy-pasting the entire notebook to another, new notebook, then pasting the following in it will delete all input cells rather than minimizing them, such that you could send it to someone if you only wanted them to have the output:

Module[{nb},
 nb = EvaluationNotebook[];
 NotebookFind[EvaluationNotebook[], "Input", All, CellStyle];
 NotebookDelete[nb]]

Though, be careful with this method as if you haven't saved in awhile, as it deletes all input cells (including itself) in the respective notebook it's evaluated in.

Alternatively, remove all inputs entirely:

Copy-pasting the entire notebook to another, new notebook, then pasting the following in it will delete all input cells rather than minimizing them, such that you could send it to someone if you only wanted them to have the output:

Module[{nb},
 nb = EvaluationNotebook[];
 NotebookFind[EvaluationNotebook[], "Input", All, CellStyle];
 NotebookDelete[nb]]

Though, be careful with this method as if you haven't saved in awhile, as it deletes all input cells (including itself) in the notebook it's evaluated in.

Alternatively, remove all inputs entirely:

Copy-pasting the entire notebook to another, new notebook, then pasting the following in it will delete all input cells rather than minimizing them, such that you could send it to someone if you only wanted them to have the output:

Module[{nb},
 nb = EvaluationNotebook[];
 NotebookFind[EvaluationNotebook[], "Input", All, CellStyle];
 NotebookDelete[nb]]

Though, be careful with this method as it deletes all input cells (including itself) in the respective notebook.

deleted 313 characters in body
Source Link
Ghersic
  • 1.2k
  • 7
  • 21

This is an extension to ssch's answer. You can do this ssch-style to all similar cells by using an undocumented trick: Alt-Clicking (on Windows) highlights all similar cells (here, input).

After highlighting all output cells, right click a highlighted cells' bracket and click "Close All Subgroups".

Alternatively, remove all inputs entirely:

Copy-pasting the entire notebook to another, new notebook, then pasting the following in it will delete all input cells rather than minimizing them, such that you could send it to someone if you only wanted them to have the output:

Module[{nb},
 nb = EvaluationNotebook[];
 NotebookFind[EvaluationNotebook[], "Input", All, CellStyle];
 NotebookDelete[nb]]

Though, be careful with this method as if you haven't saved in awhile, as it deletes all input cells (including itself) in the notebook it's evaluated in.

This is an extension to ssch's answer. You can do this ssch-style to all similar cells by using an undocumented trick: Alt-Clicking (on Windows) highlights all similar cells (here, input).

After highlighting all output cells, right click a highlighted cells' bracket and click "Close All Subgroups".

Alternatively, remove all inputs entirely:

Copy-pasting the entire notebook to another, new notebook, then pasting the following in it will delete all input cells rather than minimizing them, such that you could send it to someone if you only wanted them to have the output:

Module[{nb},
 nb = EvaluationNotebook[];
 NotebookFind[EvaluationNotebook[], "Input", All, CellStyle];
 NotebookDelete[nb]]

Though, be careful with this method as if you haven't saved in awhile, as it deletes all input cells (including itself) in the notebook it's evaluated in.

Alternatively, remove all inputs entirely:

Copy-pasting the entire notebook to another, new notebook, then pasting the following in it will delete all input cells rather than minimizing them, such that you could send it to someone if you only wanted them to have the output:

Module[{nb},
 nb = EvaluationNotebook[];
 NotebookFind[EvaluationNotebook[], "Input", All, CellStyle];
 NotebookDelete[nb]]

Though, be careful with this method as if you haven't saved in awhile, as it deletes all input cells (including itself) in the notebook it's evaluated in.

deleted 110 characters in body
Source Link
Ghersic
  • 1.2k
  • 7
  • 21
Loading
Source Link
Ghersic
  • 1.2k
  • 7
  • 21
Loading