cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Learn how to build custom Python data connectors and further customize JMP’s Data Connector Framework with the Python Data Connector Demo, available now in the JMP Marketplace!
  • See how to create experiments to support product design and ID useful product features. Register for June 12 webinar, 2pm US Eastern Time.

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