cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • New to JMP? Join us Sept. 23-24 for the Early User Edition of Discovery Summit, tailor-made for new users. Register now for free!
  • Use World Cup data to build models, explore spatial relationships, and create informative visualizations in JMP. Register. July 17, 2 pm US Eastern Time.
  • Your voice matters! Tell us how you prefer to receive JMP updates, so we can tailor our communication to your needs. Take short survey.

Discussions

Solve problems, and share tips and tricks with other JMP users.
Choose Language Hide Translation Bar

IMPORT EXCEL FILES VIA JSL - COLUMN FORMAT

Hi all i am using JSL of JMP 11.

I want to import and excel file.

Is there a way to force JMP/JSL to import ALL COLUMNS as TEXT (CHARACTER) ?

My columns have empty cells and text and number. The script I wrote in JSL automatically read them as number, therefore putting missing values in my text cells.

I want to import them as text.

here the piece of code.

dt = Open("mydata.xlsx",

Worksheets( {"Sheet1"} ),

Use for all sheets( 1 ),

Concatenate Worksheets( 1 ),

Create Concatenation Column( 1 ),

Worksheet Settings(

1,

Has Column Headers( 1 ),

Number of Rows in Headers( 3 ),

Headers Start on Row( 1 ),

Data Starts on Row( 4 ),

Data Starts on Column( 1 ),

Data Ends on Row( 0 ),

Data Ends on Column( 0 ),

Replicated Spanned Rows( 1 ),

Suppress Hidden Rows( 1 ),

Suppress Hidden Columns( 1 ),

Treat as Hierarchy( 0 )

)

);

Thank you.

Angela.

1 ACCEPTED SOLUTION

Accepted Solutions
pmroz
Super User

Re: IMPORT EXCEL FILES VIA JSL - COLUMN FORMAT

Not sure how to do it directly, but you could add a post-processing step:

dt = open("$sample_data\Big Class.jmp");

col_list = dt << get column names(Numeric, "String");

for (i = 1, i <= nitems(col_list), i++,

      column(dt, col_list[i]) << data type(character);

);

View solution in original post

1 REPLY 1
pmroz
Super User

Re: IMPORT EXCEL FILES VIA JSL - COLUMN FORMAT

Not sure how to do it directly, but you could add a post-processing step:

dt = open("$sample_data\Big Class.jmp");

col_list = dt << get column names(Numeric, "String");

for (i = 1, i <= nitems(col_list), i++,

      column(dt, col_list[i]) << data type(character);

);

Recommended Articles