Workspace files

Vertex42 The Excel Nexus

Professional Excel Templates

Get Instant Access

A workspace file is a special file that contains information about an Excel workspace. For example, if you have a project that uses two workbooks and you like to have the workbook windows arranged in a particular way, you can save an XLW file (choose the File ^ Save Workspace command) to save this window configuration. Then, whenever you open the XLW file, Excel restores the desired workspace.

Which Version Created That XLS File?

Unfortunately, there is no direct way to determine which version of Excel created a particular XLS file. If you have an earlier version of Excel and attempt to open an XLS file that was created in a later version, you'll probably get an error message or a screenful of garbage characters. But if you can open the file successfully, you can use a simple Visual Basic for Applications (VBA) statement to determine the Excel version of the file.

Open the workbook, and make sure that it's the active workbook. Press Alt+F11 to activate the Visual Basic Editor (VBE) and then press Ctrl+G to activate the Immediate window. Type the following statement and then press Enter:

Print ActiveWorkbook.FileFormat

The Immediate window displays a value that corresponds to the version of the active workbook. This value is one of those shown in the following table:

Value Excel Version

16 Excel 2

29 Excel 3

33 Excel 4

39 Excel 5, 95

-4143 Excel 97, 2000, 2002, 2003

It's important to understand that a workspace file does not include the workbooks — only the configuration information that makes those workbooks visible in your Excel workspace. So if you need to distribute a workspace to someone else, make sure that you include the workbook files as well as the XLW file. In addition, the File ^ Save Workspace command does not save the workbooks themselves.

Was this article helpful?

0 0

Post a comment