IBM Support

"Standard Error 1004 ... Excel cannot access the file" when click "Send to Application" inside "Reports - Run" when TMP variable is redirected to a non-C drive

Technote (troubleshooting)


User launches Controller, and clicks "Reports - Run". Inside "Run Reports" user chooses tab "Reports and Forms". Underneath "Forms" user chooses a form (for example "ABCD"). User clicks "Send to application".

After sending it to the application, the report shows for 1 second, then disappears. An error message appears (for example error #1). In some circumstances, if the user clicks OK a second error #2 appears.


Error #1:

H:\Temp\Cognos\CCR\XX_500-AC-1209-010-L2-010C2-LC-0-CONS’ cannot be
found. Check your spelling, or try a different path.

Error #2:

Standard Error
Number: 1004
Source: Microsoft Excel
Description: Microsoft Excel cannot access the file
H:\Temp\Cognos\XX_500-AC-1209-010-L2-010C2-LC-0-CONS’ There are
several possible reasons:

• The file name or path does not exist.
• The file is being used by another program.
• The workbook you are trying to save has the same name


  • If the end user launches Windows Explorer, and then navigates to the path shown in the first error message (for example H:\Temp\Cognos\CCR) then the relevant file is seen there.
  • In other words, if they open up the Excel file "XX_500-AC-1209-010-L2-010C2-LC-0-CONS.xls" (inside this folder) then the desired Excel report can be seen
    • For example, see printscreen below which corresponds to the same environment as the other printscreens in this Technote:


Code production problem (reference APAR PI09114).


The problem only affects users where *both* of the following are true:

(1) Client device using Excel 2007 (problem does not affect Excel 2003)

(2) The environment has been modified so that the user's %TMP% variable has been changed/redirected (from the default value) to a new drive letter (for example H:\).

  • In one real-life example, the customer was deploying Controller via Citrix, and had redirected the end user's TMP variable from the default (C:\Users\<username>\AppData\Local\Temp) to H:\TEMP
  • In another example (see printscreen of error shown above), the redirection was as follows:

Resolving the problem


Upgrade to a later version of Controller (when released) which contains a fix for this issue.

  • TIP: To be automatically notified when this is available, subscribe to APAR PI09114.


There are several possible methods to workaround the problem:

  • Method #1 - Modify the location of the user variable "TMP" to a location on the C: drive of the client device.

For example, modify %TMP% to be something similar to the following:
  • Method #2 - Downgrade client device to Excel 2003

For example downgrade from Excel 2010/2007 to Excel 2003.

  • Method #3 - Change the cache directory location

NOTE: This method only works in some environments.

For example, modify the Controller system so that it read/writes its temporary files to a sensible location (for example on the C: drive) where the user has no restrictions applied.

To achieve this, modify the "ccr.config" file and use the parameter "CacheDir". For details, see separate Technote 1409414.

  • Method #4 - Manually open the file inside the relevant folder.

For example, launch Windows Explorer and browse to: H:\Temp\Cognos\CCR\

Open the relevant Excel (XLS) file from inside here.

  • Method #5 - Modify the location of the user variable "TMP" to a UNC network location

For example, modify %TMP% to be something similar to the following:

Related information

1409414 - How to specify location for temporary cache f
APAR PI09114

Document information

More support for: Cognos Controller

Software version: 10.1, 10.1.1

Operating system(s): Windows

Reference #: 1632792

Modified date: 08 January 2014