45
Chapter 6: Importing and Exporting Data
Importing
•
135
=> For ASCII and Thermo Galactic SPC files, if you drop the data into a worksheet, the data imports into
that worksheet. If you drop the data into a blank area of the workspace, the data imports into a new
worksheet.
=> For SigmaPlot and Minitab files, the data always imports into a new worksheet, independent of where
you drop it.
When you drag-and-drop ASCII files, Origin uses the worksheet's import settings defined in the ASCII
Import Options for Worksheet dialog box. To view and alter these settings, activate your worksheet
window and then select File:Import:ASCII Options. To learn about the settings in this dialog box, see
"Customizing the Default ASCII Import Settings" on page 122.
Adding Drag-and-Drop Support for a New File Type
Origin provides a mechanism to add drag-and-drop support for additional file types. When any file is
dropped onto Origin from Windows Explorer, Origin looks in the DOFILE.OGS script file located in your
Origin folder. Specifically, it looks for a section named
[OnOpenExtension]
, where
Extension
is
the file extension of the dropped file. If found, that section is executed and the file name is passed as an
argument. This means that you can add drag-and-drop import support for custom files, by providing
routines to handle the import of an extension type.
To learn more about this, review the AUTOMATION.OPJ sample project located in your Origin
\SAMPLES\PROGRAMMING\AUTOMATION subfolder. Additionally, more information is available in
the Knowledge Database
on the OriginLab website. Search in Category = Import/Export, and use the key
word "drag".
Origin's Drag-and-Drop Data File Support for Matrices
You can drag Thermo Galactic SPC data files from Windows Explorer into an Origin matrix. To do this,
first make a matrix active in Origin. Then select the desired file in Windows Explorer. Drag the file over
the Origin taskbar button and hold there until Origin becomes active. Then continue dragging and drop
into the Origin matrix.
You can also drag image files into an Origin matrix. To learn more about Origin's support of image data,
see "Working with Raster Graphic Images in Origin".
Importing Data from a Database Using ODBC
Origin's ODBC (Open Data Base Connectivity) allows you to import data from a data source directly into
an Origin worksheet.
ODBC Terminology
Database: The term database refers to a 'DataBase Management System' (DBMS) such as Microsoft
Access. A DBMS provides an efficient way to store and access data.
Data source: The term data source refers to a particular set of data stored and managed by a particular
DBMS. For example, you might have one data source named Exp1 saved in the Microsoft Access
database, and another data source named Proj1 stored in yet another database.