Hi,
This question is similar to that of the Defining Path thread although the responses there don't seem to be helping.
I'm trying to do something like this:
%curr_path = "Z:\Forecast_Sales\Results\0815\ABC August 2015 Sales Results.xlsx"
.
.
.
%half2 = " byrow colhead=2 namepos=last na=""#N/A"" @freq Q @id @date(variable) @destid @date @smpl @all"
for %tab " range=2015 Middle" " range=2015 Upside" " range=2015 Downside"
%command = """" + "import " + %curr_path + %tab + %half2 + """"
{%command}
next
But it doesn't work. I'm clearly not understanding the treatment of spaces and use of quotes. Any explanation or code suggestion or reference location would be appreciated. Thanks,
Jonathan
file paths with spaces
Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: file paths with spaces
You need to put quotes around the %curr_path.
Something like:
Something like:
Code: Select all
%command = "import " + """" + %curr_path + """" +%tab + %half2
{%command}
Re: file paths with spaces
Thanks, that did it. I also hard-coded the range= and put double quotes around the tab name.
%command = "import " + """" + %curr_path + """" + " range=" + """" + %tab + """" + %half2
Thanks again,
Jonathan
%command = "import " + """" + %curr_path + """" + " range=" + """" + %tab + """" + %half2
Thanks again,
Jonathan
Who is online
Users browsing this forum: No registered users and 2 guests
