Subscribe Bookmark RSS Feed

How to skip commented lines while importing data?

new-jmper

Community Trekker

Joined:

Jun 23, 2011

So many of my data files have a header line that contains metadata. It is also marked with "#". Is there a way to make JMP automatically skip these lines?

It's getting tedious to manually enter "column name on line 2" for every data import when there are multiple files.  Anyway to automatize this?  

Open(

  "data1.txt",

  columns(

  X = Numeric,

  Y = Numeric,

  State = Character,

  Var1 = Numeric,

  ),

  Import Settings(

  End Of Line( CRLF, CR, LF ),

  End Of Field( Spaces, Space ),

  Strip Quotes( 1 ),

  Use Apostrophe as Quotation Mark( 0 ),

  Scan Whole File( 1 ),

  Treat empty columns as numeric( 0 ),

  Labels( 1 ),

  Column Names Start( 2 ),

  Data Starts( 3 ),

  Lines To Read( All ),

  Year Rule( "20xx" )

  )

Thanks,

Dong

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

The Import Settings can be changed in "Preference".  So there is a solution if the number of header lines are fixed.

I am still looking for ways to skip the commented lines.

Thanks,

Dong

1 REPLY
Solution

The Import Settings can be changed in "Preference".  So there is a solution if the number of header lines are fixed.

I am still looking for ways to skip the commented lines.

Thanks,

Dong