Command Reference : Command Reference
Save the active page in the default workfile as an EViews workfile (.WF1 file) or as a foreign data source.
pagesave(options) [path\]filename
pagesave(options) source_description [@keep keep_list] [@drop drop_list] [@keepmap keepmap_list] [@dropmap dropmap_list] [@smpl smpl_spec]
pagesave(options) source_description table_description [@keep keep_list] [@drop drop_list] [@keepmap keepmap_list] [@dropmap dropmap_list] [@smpl smpl_spec]
The command saves the active page in the specified directory using filename. By default, the page is saved as an EViews workfile, but options may be used to save all or part of the page in a foreign file or data source. See wfopen for details on the syntax of source_descriptions and table_descriptions. Note, in particular, that you may use the byrow table_description for Excel 2007 files to instruct EViews to save the series by row (instead of the standard by column).
type=arg, t=arg
Optional type specification: (see table below).
Note that ODBC support is provided only in the EViews Enterprise Edition.
Specify whether to create a new file, overwrite an existing file, or update an existing file. arg may be “create” (create new file only; error on attempt to overwrite) or “update” (only available for Excel files, and only if Excel is installed) (update an existing file, only overwriting the area specified by the range= table_description). If the “mode=” option is not used, EViews will create a new file, unless the file already exists in which case it will overwrite it.
Write selected maps as: numeric (“n”), character (“c”), both numeric and character (“b”).
Do not write mapped values for series with attached value labels (the default is to write mapped values)
Do not write observation identifiers to foreign data files (by default, EViews will include a column with the date or observation identifier).
Do not export variable names.
Include object attributes (if the output type supports it). When specified, the first column will contain attribute names and each attribute value will be displayed after the name row.
The following table summaries the various foreign formats, along with the corresponding “type=” keywords:
Type Keywords
Supports Attributes
“a”, “aremos”, “tsd”
Excel (through 2003)
Excel 2007 (xml)
EViews Workfile
Gauss Dataset
“g”, “give”
Lotus 1-2-3
ODBC Dsn File
ODBC Data Source
MicroTSP Workfile
“dos”, “microtsp”
MicroTSP Mac Workfile
RATS 4.x
“r”, “rats”
RATS Portable / TROLL
“l”, “trl”
SAS Program
SAS Transport
SPSS Portable
Stata (Version 7 Format)
Tableau Data Extract
Text / ASCII
TSP Portable
“t”, “tsp”
Note that if you wish to save your Excel 2007 XML file with macros enabled, you should specify an explicit filename extension of “.XLSM”.
**Also, while most output types only save objects from the current page, the JSON type will save all series objects from all pages of the current workfile and will ignore any @keep, @drop, and @smpl arguments.
pagesave new_
saves the current EViews workfile page as “New_.1” in the default directory.
pagesave "c:\documents and settings\my data\consump"
saves the current workfile page as “Consump.1” in the specified path.
To save the current page in a macro-enabled Excel 2007 file, you should specify the explicit filename extension “.XLSM”:
pagesave(type=excelxml, mode=update) range=”Sheet2!a1” byrow macro.xlsm @keep gdp unemp
See “Saving a Workfile”.
See also wfopen and wfsave.