cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
Nita_Natchanok
Level III

How do I import .txt file with several rows of column header

How do I import .txt file with several rows of column header?

 

There is no selection in txt import window to select multiple rows as column header similar to Excel Import Wizard

 

So, what I did was.

Import text as JMP table. 

Save the JMP table as xlsx. file

Import the xlsx. file by using Excel Import Wizard and specify how many rows we need for the column header

 

Is there any other way?

 

 

dT = current data table();
Directory = "$DESKTOP/";
dT_Name = dT << get Name();
XL_Name = Directory || dT_Name || ".xlsx";
dT <<  Save( XL_Name );
Close(dT);

Open(
	XL_Name,
	Worksheets( dT_Name ),
	Use for all sheets( 1 ),
	Concatenate Worksheets( 0 ),
	Create Concatenation Column( 0 ),
	Worksheet Settings(
		1,
		Has Column Headers( 1 ),
		Number of Rows in Headers( 3 ),
		Headers Start on Row( 3 ),
		Data Starts on Row( 6 ),
		Data Starts on Column( 1 ),
		Data Ends on Row( 0 ),
		Data Ends on Column( 0 ),
		Replicated Spanned Rows( 1 ),
		Replicated Spanned Headers( 0 ),
		Suppress Hidden Rows( 1 ),
		Suppress Hidden Columns( 1 ),
		Suppress Empty Columns( 1 ),
		Treat as Hierarchy( 0 ),
		Multiple Series Stack( 0 ),
		Import Cell Colors( 0 ),
		Limit Column Detect( 0 ),
		Column Separator String( "-" )
	)
);

Delete File(XL_Name);

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: How do I import .txt file with several rows of column header

I think you might be able to do it with Multiple File Import (depending on your data). Change Settings and modify CSV import settings as needed

jthi_0-1666942462776.png

 

-Jarmo

View solution in original post

1 REPLY 1
jthi
Super User

Re: How do I import .txt file with several rows of column header

I think you might be able to do it with Multiple File Import (depending on your data). Change Settings and modify CSV import settings as needed

jthi_0-1666942462776.png

 

-Jarmo