GenerateDocument

GenerateDocument[nb]

generates a document by evaluating all template elements in the notebook nb.

GenerateDocument[nb,args]

generates a document using args to fill template slots.

GenerateDocument[nb,output]

writes the generated document in the output file represented by output.

GenerateDocument[nb,args,output]

uses args to fill template slots and puts the result in output.

Details

Examples

open allclose all

Basic Examples  (1)

Generate a notebook by evaluating template elements in a template notebook:

The template notebook:

The generated document:

Scope  (1)

Template elements can iterate over lists of data to create repeating blocks:

Use the data in a template notebook:

The Repeating Block element in the template notebook:

The result of evaluating the repeating block element:

Generalizations & Extensions  (5)

Generated documents may contain anything notebooks may contain, including interactive elements:

A copy of an interactive section of the generated report:

GenerateDocument can take the input template from a cloud object:

GenerateDocument can generate an output document deployed as a cloud object:

Generate a document as a cloud object with Permissions and MetaInformation:

Deploy a template as a cloud object:

Generate a document locally using the deployed template; deploy the result as a cloud object:

Applications  (1)

Use a template to programmatically produce individualized outputs, as in a mail merge:

One of the generated documents:

Wolfram Research (2014), GenerateDocument, Wolfram Language function, https://reference.wolfram.com/language/ref/GenerateDocument.html (updated 2020).

Text

Wolfram Research (2014), GenerateDocument, Wolfram Language function, https://reference.wolfram.com/language/ref/GenerateDocument.html (updated 2020).

CMS

Wolfram Language. 2014. "GenerateDocument." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2020. https://reference.wolfram.com/language/ref/GenerateDocument.html.

APA

Wolfram Language. (2014). GenerateDocument. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/GenerateDocument.html

BibTeX

@misc{reference.wolfram_2024_generatedocument, author="Wolfram Research", title="{GenerateDocument}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/GenerateDocument.html}", note=[Accessed: 21-December-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_generatedocument, organization={Wolfram Research}, title={GenerateDocument}, year={2020}, url={https://reference.wolfram.com/language/ref/GenerateDocument.html}, note=[Accessed: 21-December-2024 ]}