AX1719
Archive Plan Files command
Use the Archive Plan Files command to convert the "live" plan files in a file group to static snapshots of the files, for viewing only. This command is intended to be used in cases where planning is finished for the file group, but you still want users to be able to view the finalized plan files. However, you do not want the plan files to be updated with new data or save data to the database.
Can be used in
- Task panes
- Ribbon tabs
When the Archive Plan Files command is selected from the Command Library as the shortcut target, it displays as command://ArchivePlanFiles.
Shortcut parameters
This command uses the following shortcut parameters:
Item | Description |
---|---|
File group |
The file group for which you want to archive plan files. You can select any file group that uses standard spreadsheet plan files. The archive process does not work for virtual plan files or form-enabled plan files. |
Archive process
When the command is executed, the following occurs:
- A plan file restore point is created before processing begins, so that plan files can be restored if the command is executed accidentally.
- Each plan file is opened and normal "open processes" occur, including applying default views, hiding sheets, and executing refresh-on-open Axiom queries and data lookups. The plan file starts out in the same state it would be in if the user executing the command opened the file normally.
- Each plan file is then processed as follows:
- All formulas in the plan file are converted to values.
- All control sheets are deleted. This disables any process that depends on a control sheet, such as Axiom queries or save-to-database.
- Refresh variables, action codes, and data lookups are disabled by prefixing the primary tags with an x. For example:
[xActionCodes]
. - Workbook and worksheet protection are applied as they were configured on the original default Control Sheet.
- The plan file is saved in this static state.
When a plan file is opened after being archived by the command, data queries will not run because there is no longer any Control Sheet, and no formulas are left to be calculated. Manually refreshing the file will have no effect. The user can still save the file if they have read/write access to it, but save-to-database processes will no longer execute because there is no longer any Control Sheet. It is recommended to downgrade all user access to read-only, so that users do not inadvertently save changes to the archive file.
Although the archive process is similar to snapshotting a file, it is not exactly the same as the standard snapshot feature. Note the following differences:
- All formulas are converted to values. There is no option to only convert Axiom formulas.
- Rows and columns tagged with
[DeleteColumn]
and[DeleteRow]
are not deleted in the archived plan files. - Hidden sheets are not deleted. They will remain hidden in the archived plan files (assuming they were hidden when the plan file was opened during processing).
IMPORTANT: All plan files are processed using the permissions of the user who is executing the command. This means that the plan files will be opened, refreshed, and then "frozen" based on the permissions of that user. All users who open the archived files will see the plan files in the same state. For example, if the "live" plan file used formulas to dynamically show and hide sheets based on the current user's permissions, this will no longer apply to the archived file.
Visibility
Items using this command are only visible if the current user is an administrator or has the Administer File Groups permission.
If the user does not have the appropriate permissions, then the item is hidden. You can use the Show restricted items option for the task pane or the ribbon tab to force the item to be visible at all times (but grayed out if unavailable).
Remarks
After this command is run, the archive process can be reversed by restoring the previous versions of plan files using the restore point created by the command. However, the previous versions of the plan files are only available until they are deleted by the system Scheduler job Purge System Data, which by default runs nightly and deletes old items based on a configured time frame. The restore point is only intended as a safeguard for a situation where the command is run accidentally, so that the plan files can be restored immediately. It is not intended to be used to convert the plan files back to "live" plan files at a later date. The archive process is permanent except for this short-term safeguard.