Write EViews data to a text (ASCII), Excel, or Lotus file on disk.
Creates a foreign format disk file containing EViews data. May be used to export EViews data to another program.
Syntax
pool_name.write(options) [path\filename] pool_series1 [pool_series2 pool_series3 ...]
Follow the keyword by a name for the output file and list the series to be written. The optional path name may be on the local machine, or may point to a network drive. If the path name contains spaces, enclose the entire expression in double quotation marks.
Note that EViews cannot, at present, write into an existing file. The file that you select will, if it exists, be replaced.
Options
prompt | Force the dialog to appear from within a program. |
Other options are used to specify the format of the output file.
File type
t=dat, txt | ASCII (plain text) files. |
t=wk1, wk3 | Lotus spreadsheet files. |
t=xls | Excel spreadsheet files. |
If you omit the “t=” option, EViews will determine the type based on the file extension. Unrecognized extensions will be treated as ASCII files. For Lotus and Excel spreadsheet files specified without the “t=” option, EViews will automatically append the appropriate extension if it is not otherwise specified.
ASCII text files
na=string | Specify text string for NAs. Default is “NA”. |
names (default) / nonames | [Write / Do not write] series names. |
id | Write dates/obs and cross-section identifiers. |
d=arg | Specify delimiter (default is tab): “s” (space), “c” (comma). |
t | Write by series. Default is to write by obs with series in columns. |
Spreadsheet (Lotus, Excel) files
letter_number | Coordinate of the upper-left cell containing data. |
names (default) / nonames | [Write / Do not write] series names. |
id | Write dates/obs and cross-section identifiers. |
dates=arg | Excel format for writing date: “first” (convert to the first day of the corresponding observation if necessary), “last” (convert to the last day of the corresponding observation). |
t | Write by series. Default is to write by obs with series in columns. |
Pooled data writing
bycross (default) / byper | Stack pool data by [cross-section / date or period]. |
Examples
pool1.write(t=txt,na=.,d=c,id) a:\dat1.csv gdp? edu?
Writes into an ASCII file named “Dat1.csv” on the A drive. The data file is listed by observations, NAs are coded as “.” (dot), each series is separated by a comma, and the date/observation numbers and cross-section identifiers are written together with the series names.
pool1.write(t=txt,na=.,d=c,id) dat1.csv gdp? edu?
writes the same file in the default directory.
mypool.write(t=xls,per) "\\network\drive a\growth" gdp? edu?
writes an Excel file “Growth.xls” in the specified directory. The data are organized by observation, and are listed by period/time.
Cross-references
See
“Exporting Data” for a discussion. Pool writing is discussed in
“Exporting Pooled Data”.