WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

ExportString [expr,"format"]

generates a string corresponding to expr exported in the specified format.

ExportString [rules,{"format","Rules"}]

gives explicit rules for different elements of the data to be exported.

ExportString [exprs,elems]

generates a string by treating exprs as elements specified by elems.

Details
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
See Also
Tech Notes
Related Guides
Related Links
History
Cite this Page

ExportString

Listing of Formats »

ExportString [expr,"format"]

generates a string corresponding to expr exported in the specified format.

ExportString [rules,{"format","Rules"}]

gives explicit rules for different elements of the data to be exported.

ExportString [exprs,elems]

generates a string by treating exprs as elements specified by elems.

Details

  • ExportString generates a string corresponding to data exported in the specified format.
  • ExportString handles a large number of formats, each typically with many different possible elements. The possible formats are given in the list $ExportFormats , and in the "Listing of All Formats".
  • ExportString works just like Export , with the same element specifications and options.
  • Many graphics, sound, and binary formats yield strings containing nonprintable characters.

Examples

open all close all

Basic Examples  (2)

Export in MathML format:

Show explicitly as a string:

Export a graphic in SVG format:

Scope  (3)

Export an array to a "CSV" string:

Export the same array to a "JSON" string:

Export a graph as a "Graph6" string:

Export with an option to suppress the header:

Export multiple graphs as "Graph6" strings:

Many formats give strings containing non-printable characters:

History

Introduced in 1999 (4.0) | Updated in 2003 (5.0) 2004 (5.1) 2007 (6.0)

Wolfram Research (1999), ExportString, Wolfram Language function, https://reference.wolfram.com/language/ref/ExportString.html (updated 2007).

Text

Wolfram Research (1999), ExportString, Wolfram Language function, https://reference.wolfram.com/language/ref/ExportString.html (updated 2007).

CMS

Wolfram Language. 1999. "ExportString." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/ExportString.html.

APA

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

BibTeX

@misc{reference.wolfram_2025_exportstring, author="Wolfram Research", title="{ExportString}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/ExportString.html}", note=[Accessed: 05-December-2025]}

BibLaTeX

@online{reference.wolfram_2025_exportstring, organization={Wolfram Research}, title={ExportString}, year={2007}, url={https://reference.wolfram.com/language/ref/ExportString.html}, note=[Accessed: 05-December-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /