Page 1 of 1

Use of import/copy and keeping descriptions

Posted: Fri Aug 25, 2023 4:44 am
by MartinsFest
Hello,

I have an external Excel-file, where names of the series are equivalent to some original series within my workfile. The original series contains values in the range between the years 1980-2200, while the new data contains forecasts for the period 2023-2050. I am updating the values in the original series with the values in the new file.

First question: Is there a way to do what I have done below, only using the import-command directly, within the page the original series are located? Meaning without creating a temporary page.

Second question: The values in my original series are correctly updated below. However, the copying also overwrites the original descriptions, which is unintentional. How do I keep my original descriptions?

Code: Select all

pagecreate(page="midl") q 'External data %path = "C:\...kt2023q3-2050q4.xlsx" import %path range=kt2023q3-2050q4!$A$2:$DG$11 byrow colhead=1 namepos=all na="#N/A" names=(,,,,,,,,,) @freq Q @id @date(series01) @smpl @all delete series* 'Merge with original variables ps kvarts copy(c=none, merge) midl\* * @src @date @dest @date

Re: Use of import/copy and keeping descriptions

Posted: Fri Aug 25, 2023 7:47 am
by EViews Gareth
The import command has a mode= option that lets you do what you want.

Re: Use of import/copy and keeping descriptions

Posted: Mon Aug 28, 2023 7:44 am
by MartinsFest
Just what I was after, thank you!