cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Due to the recently reported Microsoft outage, users may be temporarily unable to access My JMP or experience a delay receiving their verification codes. If you have previously installed JMP on your computer, this outage should not impact your ability to access the software. My JMP services will be restored as soon as Microsoft resolves this issue.
  • Image to Table JMP extension imports single or batch images as data tables. Useful to extract curves from pictures or convert image data to curve data to use in analyses like Functional Data Explorer. Download and install the extension.

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