Over the years, I've noticed that Eviews exports xls files using an outdated Excel format (Excel 2.0?). This has never really been a problem. However, I've now upgraded to Office 2010, and by default this version of Excel opens older version xls files in "protected view" which does not allow editing or linking to newer Excel files.
I know there's a way to turn off this file block behavior in Excel, but as a workaround I'm trying to redo my Eviews code to export the data to csv files. There are two problems I'm running into with trying to create a csv file using the pagesave command:
1.) Eviews is setting the first field in the csv file as a "_date_" field with each observation in the format YYYY-MM-DD. How can I instead output the standard Eviews observation string for this field (e.g. 2014M01)?
2.) Eviews is outputting NA values as literally the string "NA". How can I instead have NAs represented as blank/null values?
Output data to csv
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Output data to csv
Why not just save as .xlsx?
Re: Output data to csv
We've had trouble opening xlsx files in other software packages. It seems old-fashioned csv files are generally readable by most everything. Xls files used to be a standard file type, but I guess even Microsoft is dropping backward compatibility for its own older-version files.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Output data to csv
1. You can create an alpha series containing the data string you want, and use that alpha series instead of obsid.
2. Via the dialog you can't do anything. Via command you can change the NA representation:
2. Via the dialog you can't do anything. Via command you can change the NA representation:
Code: Select all
wfsave(type=txt) myfile.csv na="" delim=","
Who is online
Users browsing this forum: No registered users and 2 guests
