Subscribe Bookmark RSS Feed

changing the format of the column in JSL

fr2007

Community Trekker

Joined:

Jul 3, 2012

i have an excel sheet with 5 columns and one of the column "Number" has a format of Data type(Character) and Modeling Type  (Nomial). I wrote a script in JSL to perform a row operation. I need to change the format of the column "Number" as soon as I open the file in JMP. I want the required format to be Data Type(Numeric) and Modeling TYpe(Continous). I wrote a script like this:

 

dt=open();
current data table<<set name("Data Sheet");
dt=data table("Data Sheet");
dt<< column("Number",Numeric,Continous,Format(Best,12) );

 

and the script goes on...

 

but it is not changing the format of the column. could someone help me with the script.?

2 ACCEPTED SOLUTIONS

Accepted Solutions
ms

Super User

Joined:

Jun 23, 2011

Solution

Here is one way to do it:

dt:Number << Data type( Numeric ) << Set Modeling Type( Continuous );



wiebepo

Community Trekker

Joined:

Oct 10, 2011

Solution

This is another way to do the same thing. Perhaps the syntax change will resolve the issue.

column(dt,"Number")<<data type(Numeric)<<Modeling Type(Continuous)<<Format(Best,12);

4 REPLIES
ms

Super User

Joined:

Jun 23, 2011

Solution

Here is one way to do it:

dt:Number << Data type( Numeric ) << Set Modeling Type( Continuous );



fr2007

Community Trekker

Joined:

Jul 3, 2012

Can you please tell the exact format for the script that you wrote?

I used the same line:

dt=open();

dt:Number << Data type( Numeric ) << Set Modeling Type( Continuous );

so that once I open the required sheet, The format of the column "Number" is changed to Numeric and Continous, but unfortunately it is not working.

wiebepo

Community Trekker

Joined:

Oct 10, 2011

Solution

This is another way to do the same thing. Perhaps the syntax change will resolve the issue.

column(dt,"Number")<<data type(Numeric)<<Modeling Type(Continuous)<<Format(Best,12);

teresa

Community Trekker

Joined:

Jun 23, 2011

Hi FR2007,

The answer of MS is rigth.

But if you would like to prevent this problem, you have to format the variable as Numeric in the Excel file. Then JMP will understand the format of the column fine.

Also you have to avoid any character string in this column in the Excel file (except the row of column names), including cells with a space only (replace it for nothing).

Teresa