Query :
When I try to open Excel Files I
get the error message below.
CAUSE
: The
last line of the code below is the line that throws the exception
Microsoft.Office.Interop.Excel.Application
xlApp = new Microsoft.Office.Interop.Excel.Application();
string filename =
@"c:\myDir\MyFile.xlsx"
Console.WriteLine("Exists: " +
File.Exists(filename).ToString());
var wb = xlApp.Workbooks.Open(filename);
The message suggests that it can’t find my
file that I am trying to open
**Solution
1:
A.
Basically
solution is to create ‘Desktop’ folder under following paths on your machine:
>>
If your machine is 64-bit then : Then add
folder “Desktop” under systemprofile
folder as shown in below link.
- C:\Windows\SysWOW64\config\systemprofile\ Desktop
>>
If your machine is 32-bit then : Then add
folder “Desktop” under systemprofile
folder as shown in below link.
- C:\Windows\System32\config\systemprofile\
Desktop
>> Windows
2008 Server x64
Please make this folder.
C:\Windows\SysWOW64\config\systemprofile\Desktop
>>
Windows 2008 Server x86
Please make this folder.
C:\Windows\System32\config\systemprofile\Desktop
>>
Windows 7 64-bit - no need, issue does not exist.
For this Investigating for some other
solution.
ð
For this Go
To RUN , type ‘services.msc’
ð
Click on ok
ð
Go To ‘Web Client ‘
as shown in screen shot
ð
Right click
on that and make the
status started if it is stopped.
NOTE : If
you do not have permission to create folder, kindly raise a request to add folder
to local service desk. Then Restart the system.
Then try to Access EXCEL the documents.
**Solution
2: Also
need to install VBA or Microsoft Office Tools if not installed with Microsoft
Excel 2010 :
The issue is experienced if Microsoft Excel
2010 is installed without VBA or Microsoft Office Tools.
In order to work around the issue, install
Microsoft Office Tools.
Solution
3:
ð Useful
Reference: from Microsoft :
One of our users is having
problems accessing documents, both Word and Excel stored on SharePoint.
When trying to open
documents from both Sharepoint and Sharepoint Workspace they receive the
following error:
"Microsoft Excel
cannot access the file 'http://<url>/Shared Documents/File Name.xls'.
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 as a currently open workbook
ð
Sharepoint Workspace has been setup to cache the files on a Windows XP
computer with Office 2010
I have tested accessing the
files from another machine and it works properly
So far the only solutions I have read
involve deleting the cache, however the user is working in a remote
location over a mobile internet connection and deleting and redownloading will
take to long to get the user back up and running.
Cache Deleting for Windows:
Steps to clear windows cache:
1.
Open
Command Prompt. [Go to ‘start’èRun]
2.
Type
the command: rundll32.exe keymgr.dll, KRShowKeyMgr
3.
It
will display the Stored User Names and Passwords screen, which, as shown, lists
all logon credentials for servers, web sites, and programs.
It also allows you
to clear certain entries using the Remove button.
4. Remove all Windows Credentials
from the list.
5. After restarting the system,
try to access the documents on SharePoint.
Solution 4 :
>> The major reason
for that issue that you need to increase the connection time out (6 minutes is
recommended) on the web site that host the SharePoint site on IIS.
Where the connection
time-out setting is not allowing enough time for you to open a specific excel
sheet.
To set a connection
time-out value for a specific Web site:
1. In IIS Manager, expand
the local computer, expand the Web Sites folder, right-click a Web site, and
click Properties.
2. On the Web Site tab, in
the Connection timeout box, type the maximum number of seconds that IIS should
maintain an idle connection before resetting the connection.
No comments:
Post a Comment