OriginLab Corporation - Scientific Graphing and Data Analysis Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis

expASC

Contents

Menu Information

ASCII

Brief Information

Export worksheet data as ASCII file

Command Line Usage

1. expASC path:="c:\signal.dat";

2. expASC type:=csv path:="c:\signal";

3. expASC type:=dat path:="c:\signal" select:=1 separator:=cs;

4. expASC iw:=[book1]1 path:="c:\signal.dat";

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
Input Worksheet iw

Input

Worksheet

<active>
Specify the worksheet to be exported. By default, the active worksheet is sued. This value cannot be changed in the dialog box.
File Type type

Input

int

0
Specify the type of the exported file.

Option list:

  • dat:*.dat
    Export the ASCII data as a .dat file.
  • text:Text File(*.txt)
    Export the ASCII data as a .txt file
  • csv:*.csv
    Export the ASCII data as a .csv file.
  • all:All Files(*.*)
    Export the ASCII data as the file format specified by the user.
File Path path

Input

string

fname$
Specify the path and filename of output file.
Overwrite Existing overwrite

Input

int

2
Specify whether to overwrite the existing file if there is an file with the same name as the exported file.

Option list:

  • replace:Replace
    Replace the data in the existing file with the exported data.
  • append:Append
    Append the exported data to the existing file.
Export Selected Data Only select

Input

int

0
When this checkbox is selected, only the selected data will be exported. Note that the selection can be non-contiguous.
Separator separator

Input

int

0
Specify the character used as separator or delimiter. This control is not available when File Type is set to CSV. In that case, comma will be used for separator.

Option list:

  • tab:TAB
    Use Tab for delimiter.
  • comma:,
    Use comma for delimiter.
  • space:SPACE
    Use space for delimiter.
  • ct:,TAB
    Use comma and Tab for delimiter.
  • cs:,SPACE
    Use comma and space for delimiter.
Include Short Name shortname

Input

int

0
Specify whether the Short name heading row will be exported.
Include Long Name longname

Input

int

1
Specify whether the Long name heading row will be exported.
Include Units units

Input

int

1
Specify whether the Unit heading row will be exported.
Include Comments comment

Input

int

1
Specify whether the Comments heading row will be exported.
Include User Parameters userparam

Input

int

0
Specify whether the User Parameters rows will be exported.
Include Sampling Interval sampinterv

Input

int

0
Specify whether the Sampling interval heading row will be exported.
Include Parameters parameter

Input

int

0
Specify whether the Parameter heading row will be exported.
Include Row Labels and Index rowlabel

Input

int

0
Specify whether the row labels and index numbers will be exported.
Export with Full Precision precision

Input

int

1
Specify whether data should be exported with full precision. The default value is true.
Export Sampling Interval as New Column addxcol

Input

int

0
Specify whether to add a new time column to the output data according to the sampling interval.
Export Missing Values as "--" missing

Input

int

1
Specify whether to export missing values as the "--" string.
Suffix for numbers in text cell suffix

Input

string

You can add suffix for numeric numbers in text columns. If you wish to do so, use this variable to specify the suffix.

Description

The expASC function exports worksheet data as ASCII file.

Note that the ASCII export is limited to data-only worksheets. Complex documents containing embedded information -- report sheets, worksheets with embedded or linked graphs (including sparklines) -- cannot be exported to ASCII files. If the worksheet to be exported has embedded images and graphs, those images and graphs will be ignored during exporting.

Examples

The following example exports the active worksheet as a text file (c:\test.txt):

  1. From the Origin menu, select File: Export: ASCII. This opens the ASCIIEXP dialog.
  2. Use the Save As Type drop-down list to select Text File *.txt. Enter c:\test.txt for File Path.
  3. Clear the Show Options Dialog check box.
  4. Click Save to close the dialog.

Related X-Functions

impASC, expMatASC