Page 1 of 1

program problem with importing data

Posted: Mon Apr 22, 2024 1:38 am
by penps
Hi EV team,
I created a prg file with following codes. But it says "c:\program files\(c=max, type=excel).wf1 not found on disk in "IMPORT (C=MAX, TYPE=EXCEL) "C:\PROGRAM FILES\\INFLATION.XLSX" RANGE="FOR SA! B4:R500" @FREQ M "1995M1"" in INFLATION.PRG on line 13." Don't know what was wrong? thanks

prg codes below:

%MyPath = "c:\program files\"
%EVOutputPath =%MyPath+"\Eviews_files"
%EVOutputFile = "inflation_EVout.xls"
%EVInputFile = "inflation.xlsx"
%Program = %EVOutputPath +"\program.txt"

%FirstOb = "1995m1"
%LastOb = "2025m12"
!SeriresNum = 17

cd %MyPath

import (c=max, type=excel) "c:\program files\\inflation.xlsx" range="for SA! b4:r500" @freq m %FirstOb

for !1 = 1 to !SeriresNum
s{!i}.x12(sfile=%Program, save="d11")
next !1

cd %EVoutputPath

write(t=xls) %EVOutputFile s1_sa s2_sa s3_sa s4_sa s5_sa s6_sa s7_sa s8_sa s9_sa s10_sa s11_sa s12_sa

Re: program problem with importing data

Posted: Mon Apr 22, 2024 8:11 am
by EViews Steve
Remove the space after the word "IMPORT" and before the first parenthesis.

Code: Select all

import(c=max, type=excel) "c:\program files\\inflation.xlsx" range="for SA! b4:r500" @freq m %FirstOb