Command Reference : Command Reference
  
 
pagesave
Save the active page in the default workfile as an EViews workfile (.WF1 file) or as a foreign data source.
Syntax
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).
Options
 
type=arg, t=arg
Optional type specification: (see table below).
Note that ODBC support is provided only in the EViews Enterprise Edition.
mode=arg
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.
maptype=arg
Write selected maps as: numeric (“n”), character (“c”), both numeric and character (“b”).
nomapval
Do not write mapped values for series with attached value labels (the default is to write mapped values)
noid
Do not write observation identifiers to foreign data files (by default, EViews will include a column with the date or observation identifier).
nonames
Do not export variable names.
attr
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
Access
“access”
 
Aremos-TSD
“a”, “aremos”, “tsd”
 
Binary
“binary”
 
dBASE
“dbase”
 
Excel (through 2003)
“excel”
Yes
Excel 2007 (xml)
“excelxml”
Yes
EViews Workfile
---
 
Gauss Dataset
“gauss”
 
GiveWin/PcGive
“g”, “give”
 
HTML
“html”
 
JSON**
json
 
Lotus 1-2-3
“lotus”
 
ODBC Dsn File
“dsn”
 
ODBC Data Source
“odbc”
 
MicroTSP Workfile
“dos”, “microtsp”
 
MicroTSP Mac Workfile
“mac”
 
RATS 4.x
“r”, “rats”
 
RATS Portable / TROLL
“l”, “trl”
 
SAS Program
“sasprog”
 
SAS Transport
“sasxport”
 
SPSS
“spss”
 
SPSS Portable
“spssport”
 
Stata (Version 7 Format)
“stata”
 
Tableau Data Extract
“tde”
 
Text / ASCII
“text”
Yes
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.
Examples
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
Cross-references
See “Saving a Workfile”.
See also wfopen and wfsave.