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

String Operations after Reading from Excel

Hello, 

 

I am reading a cell from Excel which is read by JMP as - "['299','523']". I need the string to be manipulated to be {"299","523"}. I am not able to do this. 

 

Any help would be appreciated. There probably is an easy solution but I cannot figure it out. 

 

Thanks,

Neel

3 REPLIES 3
txnelson
Super User

Re: String Operations after Reading from Excel

Use the Substitute() function to ca hange characters
Jim

Re: String Operations after Reading from Excel

Hi Jim, 

 

I tried that already, but I cannot replace " (double quotes) in the string with an empty space. Any suggestions?

 

This: temp = Substitute(string,""\", " "); doesn't work and I get errors.

 

Thanks!

jthi
Super User

Re: String Operations after Reading from Excel

Substitute should work fine here

Names Default To Here(1);

str = "['299','523']";

str2 = Substitute(str, "'", "\!"", "[", "{", "]", "}");

Write(str2);

You can find escape sequences for quoted strings here Scripting Guide > JSL Building Blocks > JSL Syntax Rules 

-Jarmo

Recommended Articles