cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Instantly extract effect sizes, F-ratios, and FDR-adjusted p-values from your models with the Calculate Effects Sizes extension, available now in the JMP Marketplace!
  • 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!
  • See how to use the JMP Marketplace – Free tools to expand JMP capabilities. Register. July 10, 2 pm US Eastern Time.

Discussions

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

Open file in excel with whitespace in filename

Hi,

Is it possible to open an Excel file from JMP where there is whitespace in the filename or path?

Code from this post works where there is no whitespace:

Solved: Open Excel File in Excel (Windows standard application) by JSL - JMP User Community

 
 
excel_file_to_open = Concat( "/X:/folder location/",excel_file_new_name);
RP = Run Program(
Executable( "C:\Program Files\Microsoft Office\root\Office16\excel.exe" ),
Options( {"/r",SUBSTR(excel_file_to_open,2)} )
);
 

Unfortunately I can't use web() to open the file as this seems to be clashing with another application and causing an error.

Any help appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
jthi
Super User

Re: Open file in excel with whitespace in filename

Something like this might work (convert file path + escaped quotes)

Names Default To Here(1);

excel_file_to_open = Convert File Path("$DOWNLOADS\New folder (3)\sauna2.xlsx", "windows");

RP = Run Program(
	Executable("C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE"),
	Options( {"/r","\!""||excel_file_to_open|| "\!""} )
);
-Jarmo

View solution in original post

2 REPLIES 2
jthi
Super User

Re: Open file in excel with whitespace in filename

Something like this might work (convert file path + escaped quotes)

Names Default To Here(1);

excel_file_to_open = Convert File Path("$DOWNLOADS\New folder (3)\sauna2.xlsx", "windows");

RP = Run Program(
	Executable("C:\Program Files\Microsoft Office\root\Office16\EXCEL.EXE"),
	Options( {"/r","\!""||excel_file_to_open|| "\!""} )
);
-Jarmo
anna_717
Level II

Re: Open file in excel with whitespace in filename

Thanks for your help

Recommended Articles