2.7.62 impSPC


Contents

Menu Information

Data: Import from File: Thermo (SPC, CGM)


If you do not see this file type, choose Data: Import from File: Add/Remove File Types...

To add drag & drop support for a file type, see .

This X-Function supports file re-import. See for details.

Brief Information

Import Thermo File

Command Line Usage

impSPC fname:="c:\test.spc";

X-Function Execution Options

Variables

Display
Name
Variable
Name
I/O
and
Type
Default
Value
Description
File Name fname

Input

string

fname$
Filename of the file to be imported.
File Info trfiles

Input

TreeNode

<unassigned>
This is used in the dialog for displaying the basic information of the file.
Rename Column Short Name with Custom Label sname

Input

int

0
Whether rename column Short Name with Custom Label, true means rename and false means not

Note that from Origin 2017 to alphabetical order and it cannot be edited by default. If you want to rename column Short Names on file import, you will need to go to the target workbook, uncheck the Spreadsheet Cell Notation checkbox in . This will allow overwrite of column Short Name on import.

Import Options options

Input

TreeNode

<unassigned>
This is used to tweak the import options in the dialog. Please see the Description part of this document for details.
Output orng

Output

Range

<active>
This is used to specify the output range.

See the syntax .

Header Info trheader

Output

TreeNode

<optional>
This is for outputting the header information. It is hidden from the GUI. Users are not advised to use this variable.
Repeat Import reimp

Input

int

0
Specifies whether or not reimport is allowed.

Description

This X-Function is used for importing Thermo data files.

Details on Some Dialog Options

  • Import Options(options)
Please see for more details.

Examples

  1. The following example imports a SPC file into a new book and renames the book with the filename:
    a. From the Origin menu, select Data: Import from File: Thermo (SPC, CGM). This opens the Import Thermo Galactic File dialog for you to choose the import file.
    b. Browse to the folder where your data file is. Select the file and click the Add File(s) button. Click OK to close the dialog box.
    c. In the impSPC dialog box, expand Import Options. Select Start new books for Import Mode. Make sure that Rename book with (partial) filename is checked and Trim filename from and Trim filename to textboxes below it are 1 and 0, respectively. Click Ok to close the dialog.
  2. The following script command imports a SPC file (c:\test.spc) without opening the dialog:
    Fname$="c:\test.spc";
    impSPC;

Related X-Functions

,