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

2.15 FAQ-425 How to skip string when testing non-numeric in Import Wizard dialog?

Last Update: 10/2/2015


When you import ASCII data using the Import Wizard, there is a setting to test when non-numeric data is found in a numeric field. If non-numeric data is interspersed with numeric data, you can use this control to decide what action should be taken.

Origin has a variable which must be manually assigned to exclude a string from the non-numeric test. For example, your data may have NAN where values were missing.

Using this sample data as an example, the non-numeric test would trigger when it encountered RUN#2 as well as NAN. If our intent is to treat NAN as just another data value then we must assign the variable prior to importing.

RUN#1 Production Scrap
1 18.4 0.42
2 NAN NAN
3 7.6 0.01
4 9.2 0.63
5 NAN NAN
6 17.2 0.05
RUN#2 Production Scrap
1 4.4 0.46
2 11 0.25
3 NAN NAN
4 12 0.18
5 5.4 0.98
6 11.8 0.87

Before you import the file, run

__SNUM$="NAN"

in the Command Window. NAN will not be considered as text to trigger new data. Then you can use the Non-Numeric Data in a Numeric Field Controls in the Data Selection Page of Import Wizard to decide what action should be taken when non-numeric data - such as RUN#2 are encountered. In this case, without the special exclusion, using the Start new worksheet option would result in five worksheets whereas with the special exclusion we would get two.


Keywords:import, text data, non-numeric data, skip string, skip text, import wizard

 

© OriginLab Corporation. All rights reserved.