Tuesday, October 08, 2013

Microsoft Excel compatibility: “. cannot be accessed. The file may be corrupted, located on a server that is not responding, or read-only”

I got this 'error' (it is an information box) on new Windows 7 clients running Office 2010 (excel) at a client of ours; after some troubleshooting i got the whole the story en wrote it down here.

Case:

In the case of this error, the situation is as follows:
Coming from Windows XP SP3 clients with Office 2003 (sp3) the end users got new PC’s with Windows 7 Prof SP1 and Office 2010 SP2. using these systems some users got back to me complaining they got the error “. cannot be accessed. The file may be corrupted, located on a server that is not responding, or read-only”  this occurred when opening (old) .xls files (but i have also seen it with old .ppt and .doc files) on the network.
I should tell you the error we got was in Dutch, here it reads: “Kan geen toegang krijgen tot . Het bestand is mogelijk beschadigd of staat op een server die niet reageert. Het kan ook zijn dat het bestandeen alleen-lezenbestand is.

Solution:

So as mentioned the information box appears when Windows 7 wants to write this file to the offline files cache. the solution in domains is to disable Offline files on Windows 7 (default it is enabled in Windows 7, you explicitly have to turn Offline files feature off!). the solution is shown here and here.

Analysis

The thing sticking out here is: the file in the error is designated as “.”  this is an indication for a fault in name resolution. working on this error the primary analysis is: Opening a .xls file that resides on a network Excel opens the file in compatibility mode. We know this because the file is being opened in compatibility mode by excel and on display on the screen when the error is thrown. Hence the error is being caused by a process after opening the .xls file.
Viewing the event log it warns me about Event ID: 300 Source: Microsoft Office 14 Alerts it tells me things like:

Microsoft Excel
Kan geen toegang krijgen tot . Het bestand is mogelijk beschadigd of staat op een server die niet reageert. Het kan ook zijn dat het bestand een alleen-lezenbestand is.
P1: 100101
P2: 14.0.7015.1000
P3: xqgg
P4:
What do these P-codes mean?
P1: application name that has occurred this error
P2: application version
P3: application time stamp
P4: Assembly/Module name
P5: Assembly/Module version
P6: Assembly/Module timestamp
P7: MethodDef
P8: IL offset
P9: exception name

In this case the application 100101 probably is explorer, version is the Excel version, the timestamp is really puzzling me though, it could be the event viewer is having trouble converting the timestamp code… I did some google-ing and found these threads: http://code.google.com/p/win-sshfs/issues/detail?id=42 http://social.technet.microsoft.com/Forums/office/en-US/56b360c5-1f80-4d8b-b7bc-43e421b7d3f2/excel-causes-error-on-open-cannot-be-accessed-the-file-may-be-corrupted-located-on-a-server?forum=excel they are both suggesting problems with accessing data, only one of them thinks it is a local computer issue.

Diving deeper

After seeing these threads i got the impression it would be something to do with the access of the network. i checked everything on name resolution, that was ok, secondly i checked all settings in Excel, they are all the same as the Citrix (server 2008 R2) environment on which it all works, no questions asked. they are all the same.
So next up: troubleshooting steps.
After mapping the network drive directly to another drive letter i got it working without errors. what’s the difference? the mappings used in the problem are mapped from a DFS share! so not using the DFS mapping resolves the problem!! what’s the issue then? DFS maps network shares to a single ‘DFS tree’ mapping drives from this tree will result in windows calls to the DFS root, which, on its turn, will resolve the mapping to UNC named paths. So that’s probably the source of the erratic behaviour of Excel.
Reconstructing the cause together with the information drawn here makes me think Excel in compatibility mode will open a .xls file do some redrawing of some sort to make it accessible to the new Excel Open office file format (or something) and then write this information back to the original file. this last step does not seem to be successful…

Update: after further digging i came to the solution, it finally appeared to be an issue related with Offline files feature in Windows 7.

Workarounds

There are two general workarounds:
  1. Open the file, cancel the error and convert it to the new (.xlsx) format.
  2. Map a new drive letter to the share from which the file is coming from and open it.

Some thoughts about this problem

First of all, Microsoft should give us more information about the way Excel works in compatibility mode (only from purely cosmetically point of view it should be solved) secondly converting all files to the new file format will give us a whole lot extra files (and overhead) aside from the storage problems it will probably raise.
See you next time!





No comments:

Post a Comment