cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
Hellford
Level I

How to rename column 1 for every file during multiple file import

Hi guys, 

I wish to rename the first column of every file so that all files can be imported to one single file.

Would anyone be able to help please?

 

Multiple File Import(
	<<Set Folder( "C:\Work folder\" ),
	<<Set Show Hidden( 0 ),
	<<Set Subfolders( 0 ),
	<<Set Name Filter( "*.*;" ),
	<<Set Name Enable( 0 ),
	<<Set Size Filter( {50795737, 79592416} ),
	<<Set Size Enable( 0 ),
	<<Set Date Filter( {3749625183.289, 3749827680.114} ),
	<<Set Date Enable( 0 ),
	<<Set Add File Name Column( 1 ),
	<<Set Add File Size Column( 0 ),
	<<Set Add File Date Column( 0 ),
	<<Set Import Mode( "CSVData" ),
	<<Set Charset( "Best Guess" ),
	<<Set Stack Mode( "Stack Similar" ),
	<<Set CSV Has Headers( 1 ),
	<<Set CSV Allow Numeric( 1 ),
	<<Set CSV First Header Line( 1 ),
	<<Set CSV Number Of Header Lines( 1 ),
	<<Set CSV First Data Line( 15 ),
	<<Set CSV EOF Comma( 1 ),
	<<Set CSV EOF Tab( 0 ),
	<<Set CSV EOF Space( 0 ),
	<<Set CSV EOF Spaces( 0 ),
	<<Set CSV EOF Other( "" ),
	<<Set CSV EOL CRLF( 1 ),
	<<Set CSV EOL CR( 1 ),
	<<Set CSV EOL LF( 1 ),
	<<Set CSV EOL Semicolon( 0 ),
	<<Set CSV EOL Other( "" ),
	<<Set CSV Quote( "\!"" ),
	<<Set CSV Escape( "" ),
	<<Set XML Method( "guess" ),
	<<Set XML Guess( "huge" ),
	<<Set XML Settings( XML Settings() ),
	<<Set JSON Method( "guess" ),
	<<Set JSON Guess( "huge" ),
	<<Set JSON Settings( JSON Settings() ),
	<<Set Import Callback( Empty() ),
) << Import Data;

//col = Column( 1 );
//col << Set Name( "Results" );
2 REPLIES 2

Re: How to rename column 1 for every file during multiple file import

Save the data table reference returned from the function call. Use it to refer to the first column when you send the message.

 

dt = Multiple File Import( ... ) << Import Data;

Column( dt, 1 ) << Set Name( "Results" );
txnelson
Super User

Re: How to rename column 1 for every file during multiple file import

A source column is added to each file generated, which will allow you to concatenate all of the files into one file.  If you want to change the name of the first column in each file, that is easy to do after the files have been imported.

 

Jim