An offline cube file (.cub) stores data in the form of an Online Analytical Processing (OLAP) cube. This data may represent a portion of an OLAP database from an OLAP server or it may have been created independently of any OLAP database. Use an offline cube file to continue to work with PivotTable and PivotChart reports when the server is unavailable or when you are disconnected from the network.
Security Note: Be careful using or distributing an offline cube file that contains sensitive or private information. Instead of a cube file, consider keeping the data in the workbook so that you can use Rights Management to control access to the data. For more information, see Information Rights Management in Office.
When you work with a PivotTable or PivotChart report that is based on source data from an OLAP server, you can use the Offline Cube Wizard to copy the source data to a separate offline cube file on your computer. To create these offline files, you must have the OLAP data provider that supports this capability, such as MSOLAP from Microsoft SQL Server Analysis Services, installed on your computer.
Note: The creation and usage of offline cube files from Microsoft SQL Server Analysis Services is subject to the term and licensing of your Microsoft SQL Server installation. Refer to the appropriate licensing information of your SQL Server version.
Using the Offline Cube Wizard
To create the offline cube file, you use the Offline Cube Wizard to select a subset of the data in the OLAP database and then save that subset. Your report doesn't have to include every field that you include in the file, and you can select from any of the dimensions and data fields that are available in the OLAP database. To keep the size of your file to a minimum, you can include only the data that you want to be able to display in the report. You can omit entire dimensions and, for most types of dimensions, you can also omit lower-level detail and top-level items that you don't need to display. For any items that you include, the property fields that are available in the database for those items are also saved in your offline file.
Taking data offline and then bringing the data back online
To do this, you first create a PivotTable or PivotChart report that is based on the server database, and you then create the offline cube file from the report. You can then switch the report between the server database and the offline file whenever you want; for example, when you use a portable computer to take work home or on a trip, and later reconnect the computer to your network.
The following procedure provides the basic steps for taking data offline and then bringing the data back online.
-
Create or open a PivotTable or PivotChart report that is based on the OLAP data that you want to access offline.
-
Create an offline cube file on your computer. See the section Create an offline cube file from an OLAP server database (below, in this article).
-
Disconnect from your network and work with the offline cube file.
-
Reconnect to your network and reconnect the offiline cube file. See the section Reconnect an offline cube file to an OLAP server database (below, in this article).
-
Refresh the offline cube file with new data and then recreate the offline cube file. See the section Refresh and recreate an offline cube file (below, in this article).
-
Repeat this procedure, beginning with step 3.
Note: If your OLAP database is large and you want the cube file to provide access to a large subset of the data, you will need to provide ample disk space, and you will find that saving the file may prove to be time consuming. To improve performance, consider creating the offline cube file by using an MDX script.
-
Click the PivotTable report for which you want to create an offline cube file — you can also click the associated PivotTable report for a PivotChart report.
-
On the Analyze tab, in the Calculations group, click OLAP tools, and then click Offline OLAP.
The Offline OLAP settings dialog box is displayed.
Note: If your OLAP provider doesn't support offline cube files, the Offline OLAP command is unavailable. Contact the vendor for your OLAP provider for more information.
-
Click Create offline data file or, if an offline cube file already exists for the report, click Edit offline data file.
The Offline Cube Wizard is displayed.
-
In step 1 of the wizard, click Next.
-
In step 2 of the wizard, select each dimension from your server cube that has data that you want to include in the offline cube file. Click the box next to each such dimension, and select the levels that you want to include.
Notes:
-
You cannot skip intermediate levels within a dimension.
-
To reduce the size of the cube file, omit lower levels that you don't need to view in the report.
-
Be sure to include any dimensions where you have grouped items, so that Microsoft Office Excel can maintain these groupings when you switch between the server database and the offline file.
-
Dimensions that do not have a box don't allow you to exclude levels. You can only include or exclude all of this type of dimension.
-
-
In step 3 of the wizard, click the box next to Measures, and select the fields that you want to use as data fields in the report. You must select at least one measure; otherwise the dimensions associated with the measure will contain no data. For each dimension listed under Measures, click the box next to the dimension, and then select the top-level items to include in the offline cube file.
-
To limit the size of the cube file so that you don't run out of disk space and to reduce the amount of time required to save the file, select only the items that you need to view in the report. Any property fields that are available for the items that you select are automatically included in the cube.
-
If items that you want to include are missing, you may not have included the dimension that contains them in the previous step. Click Back in the wizard and select the missing dimension in step 2, and then return to step 3.
Note: In the OLAP Cube Wizard, the only summary functions available for data fields are Sum, Count, Min, and Max.
-
-
In step 4 of the wizard, enter a name and location for the .cub file, and then click Finish.
To cancel saving the file, click Stop in the Create Cube File – Progress dialog box.
-
After Excel has finished creating the offline cube file, click OK in the Offline OLAP Settings dialog box.
Issue: My computer ran out of disk space while saving a cube.
OLAP databases are designed to manage very large amounts of detailed data and, as a result, the server database may occupy a much larger amount of disk storage than your local hard disk provides. If you specify a large subset of this data for your offline cube file, your hard disk may run out of space. The following strategies can help reduce the size of your offline cube file.
Free up disk space or find another disk Delete files that you don't need from your disk before saving the cube file, or save the file on a network drive.
Include less data in the offline cube file Consider how you can minimize the amount of data in the file and still have what you need for your PivotTable or PivotChart report. Try the following:
-
Eliminate dimensions In step 2 of the Offline Cube Wizard, select only the dimensions that are actually displayed as fields in your PivotTable or PivotChart report.
-
Eliminate levels of detail Click the box next to each selected dimension in step 2 of the wizard, and then clear the check boxes for levels lower than those displayed in your report.
-
Eliminate data fields In step 3 of the wizard, click the box next to Measures, and then select only the data fields you're using in the report.
-
Eliminate items of data Click the box next to each dimension in step 3, and then clear the check boxes for items that you don't need to see in the report.
-
Click the PivotTable report or associated PivotTable report for a PivotChart report.
-
On the Analyze tab, in the Calculations group, click OLAP tools, and then click Offline OLAP.
-
Click On-line OLAP, and then click OK.
-
If you are prompted to locate the data source, click Browse to find source, and then locate the OLAP server on your network.
Refreshing an offline cube file, which re-creates it by using the most recent data from the server cube or new offline cube file, can be a time consuming process and require a lot of temporary disk space. Start the process at a time when you do not need immediate access to other files, and make sure that you have adequate disk space to save the file again.
-
Click the PivotTable report that is based on the offline cube file.
-
In Excel 2016: On the Data tab, in the Queries & Connections group, click the arrow next to Refresh All, and then click Refresh.
Issue: New data doesn't appear in my report when I refresh.
Make sure the original database is available The offline cube file may not be able to connect with the original server database to retrieve new data. Check that the original server database that supplied the data for the cube hasn't been renamed or moved. Make sure the server is available and that you can connect to it.
Make sure new data is available Check with the database administrator to determine whether the database has been updated in the areas included in your report.
Make sure the database organization hasn't changed If an OLAP server cube has been rebuilt, you may need to reorganize your report or create a new offline cube file or OLAP Cube Wizard cube to access the changed data. Contact the database administrator to find out about changes that were made to the database.
Saving a revised offline cube file can be a time consuming process, and you cannot do other work in Excel while the file is being saved. Start the process at a time when you do not need immediate access to other files, and make sure that you have adequate disk space to save the file again.
-
Make sure that you are connected to your network and that you can access the original OLAP server database that supplied the data for the offline cube file.
-
Click a PivotTable report that is based on the offline cube file, or click the associated PivotTable report for a PivotChart report.
-
On the Analyze tab, in the Calculations group, click OLAP tools, and then click Offline OLAP.
-
Click Offline OLAP, and then click Edit offline data file.
-
Follow the steps in the Offline Cube Wizard to select different data for the file. In the last step, specify the same name and location as the existing file that you are changing.
Note: To cancel saving the file, click Stop in the Create Cube File – Progress dialog box.
Warning: If you delete the offline cube file for a report, you can no longer use the report offline or create a new offline cube file for the report.
-
Close all workbooks containing reports that use the offline cube file, or make sure all such reports have been deleted.
-
In Windows, locate and delete the offline cube file (.cub).
Need more help?
You can always ask an expert in the Excel Tech Community or get support in Communities.