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
fr2007
Level II

changing the format of the column in JSL

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 (Alumni) ms
Super User (Alumni)

Re: changing the format of the column in JSL

Here is one way to do it:

 

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

 

 

View solution in original post

wiebepo
Level III

Re: changing the format of the column in JSL

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);

View solution in original post

4 REPLIES 4
ms
Super User (Alumni) ms
Super User (Alumni)

Re: changing the format of the column in JSL

Here is one way to do it:

 

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

 

 

fr2007
Level II

Re: changing the format of the column in JSL

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
Level III

Re: changing the format of the column in JSL

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
Level I

Re: changing the format of the column in JSL

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