Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.

Export

Usage

Export["file.ext", expr] exports data to a file, converting it to a format corresponding to the file extension ext.
Export["file", expr, "format"] exports data to a file, converting it to the specified format.


Notes

Export can handle numerical and textual data, graphics, sounds, material from notebooks, and general expressions in various formats.
• The following basic formats are supported for numerical and textual data:
"CSV" comma-separated value tabular data (.csv)
"Lines" list of strings to be placed on separate lines
"List" list of numbers or strings to be placed on separate lines
"Table" list of lists of numbers or strings to be placed in a two-dimensional array (.dat)
"Text" single string of ordinary characters (.txt)
"TSV" tab-separated value tabular data (.tsv)
"UnicodeText" single string of 16-bit Unicode characters
"Words" list of strings to be separated by spaces
• In "CSV", "List" and "Table" format, numbers are written in C or Fortran-like "E" notation when necessary.
• In "CSV" format, columns are separated by commas, unless other settings are specified using ConversionOptions.
• In "Table" format, columns are separated by spaces.
Export["file.txt", expr] uses "Text" format.
Export["file.dat", expr] uses "Table" format.
• The following additional formats are also supported for numerical and textual data:
"DIF" Lotus Data Interchange Format (.dif)
"FITS" FITS astronomical data format (.fit, .fits)
"HarwellBoeing" Harwell-Boeing matrix format
"HDF" Hierarchical Data Format (.hdf)
"HDF5" HDF5 format (.h5)
"MAT" MAT matrix format (.mat)
"MTX" Matrix Market format (.mtx)
"XLS" Excel spreadsheet format (.xls)
• All graphics formats in Export can handle any type of 2D or 3D Mathematica graphics.
• They can also handle Notebook and Cell objects.
• In some formats, lists of frames for animated graphics can be given.
• The following options can be given when exporting graphics:
ImageResolution Automatic resolution in dpi for the image
ImageRotated False whether to rotate the image (landscape mode)
ImageSize Automatic overall image size
• The following graphics formats are independent of the setting for ImageResolution:
"APS" Mathematica abbreviated PostScript (.aps)
"EPS" Encapsulated PostScript (.eps)
"PDF" Adobe Acrobat portable document format (.pdf)
"PICT" Macintosh PICT
"SVG" Scalable Vector Graphics (.svg)
"WMF" Windows metafile format (.wmf)
• The following graphics formats depend on the setting for ImageResolution:
"AVI" Audio Video Interleave format (.avi)
"BMP" Microsoft bitmap format (.bmp)
"DICOM" DICOM medical imaging format (.dcm, .dic)
"EPSI" Encapsulated PostScript with device-independent preview (.epsi)
"EPSTIFF" Encapsulated PostScript with TIFF preview
"GIF" GIF and animated GIF (.gif)
"JPEG" JPEG (.jpg, .jpeg)
"MGF" Mathematica system-independent raster graphics format (.mgf)
"PBM" portable bitmap format (.pbm)
"PCX" PCX format (.pcx)
"PGM" portable graymap format (.pgm)
"PNG" PNG format (.png)
"PNM" portable anymap format (.pnm)
"PPM" portable pixmap format (.ppm)
"TIFF" TIFF (.tif, .tiff)
"XBitmap" X window system bitmap (.xbm)
• The following three-dimensional graphics formats are supported:
"DXF" AutoCAD drawing interchange format (.dxf)
"STL" STL stereolithography format (.stl)
• The following sound formats are supported:
"AIFF" AIFF format (.aif, .aiff)
"AU"  law encoding (.au)
"SND" sound file format (.snd)
"WAV" Microsoft wave format (.wav)
Notebook and Cell objects, as well as any box expression obtained from ToBoxes, can be exported in the following formats:
"HTML" HTML (.htm, .html)
"NB" Mathematica notebook format (.nb)
"TeX" TeX (.tex)
"XHTML+MathML" XHTML with MathML inclusions (.xml)
• These formats generate markup material which maintains much of the document structure that exists within Mathematica.
• The following XML formats are supported:
"ExpressionML" format for Mathematica expressions
"MathML" format for mathematical expressions (.mml)
"NotebookML" format for notebook expressions (.nbml)
"SVG" Scalable Vector Graphics format for graphics (.svg)
"XML" format determined by content (.xml)
• With format "MathML", box expressions are exported in terms of MathML presentation elements. Other expressions are if possible exported in TraditionalForm format.
• With format "XML", notebook or cell expressions, and notebook objects, are exported as NotebookML. SymbolicXML expressions are exported as general XML. Other expressions are exported as ExpressionML.
• Arbitrary Mathematica expressions can be exported in the following formats:
"Dump" internal binary format (.mx)
"Expression" InputForm textual format (.m)
"ExpressionML" XML-based ExpressionML format
• Lists of numbers can be exported in the following raw binary formats:
"Bit" single bits (0 or 1)
"Byte" 8-bit unsigned integers
"Complex64" IEEE single-precision complex numbers
"Complex128" IEEE double-precision complex numbers
"Complex256" IEEE quad-precision complex numbers
"Integer8" 8-bit signed integers
"Integer16" 16-bit signed integers
"Integer32" 32-bit signed integers
"Integer64" 64-bit signed integers
"Integer128" 128-bit signed integers
"Real32" IEEE single-precision real numbers
"Real64" IEEE double-precision real numbers
"Real128" IEEE quad-precision real numbers
"UnsignedInteger8" 8-bit unsigned integers
"UnsignedInteger16" 16-bit unsigned integers
"UnsignedInteger32" 32-bit unsigned integers
"UnsignedInteger64" 64-bit unsigned integers
"UnsignedInteger128" 128-bit unsigned integers
• In each case, numbers are if possible coerced to the format specified, with high-order bits dropped when necessary.
• Byte ordering is specified by the ByteOrdering option.
• Raw data for real and complex numbers may differ from one type of computer to another.
• Lists of characters or strings can be exported in the following raw binary formats:
"Character8" 8-bit characters
"Character16" 16-bit characters
"TerminatedString" null-terminated strings of 8-bit characters
• The following general options can be given:
ByteOrdering $ByteOrdering what byte order to use for binary data
CharacterEncoding Automatic the encoding to use for text characters
ConversionOptions {} private options for specific formats
• Many details can be specified in the setting for ConversionOptions.
• Possible formats accepted by Export are given in the list $ExportFormats.
Export["!prog", expr, "format"] exports data to a pipe.
• New in Version 4; modified in 5.1.


Any questions about topics on this page? Click here to get an individual response.Buy NowFree TrialMore Information



 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy |
Sign up for our newsletter: