Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Excel Services FileOpenAccessDenied Exception

  Asked By: Melissa    Date: Sep 17    Category: Sharepoint    Views: 1498

I have a web part calling out to the
Excel Services web service (code appears below). I am simply trying
to return the value from a cell, but I can't even get the file open.

I am getting the FileOpenAccessDenied exception, even though the user
is a site owner for everything, from the site collection on down. I
have even tried overriding permissions in the doc library to ensure
that the user is the owner.

I have set up the entire site collection as a trusted location for
Excel Services.

I have published a major version of the spreadsheet in the document

Can someone please help me? I have been fighting this for two days.

Here is my web part code:

using System;
using System.Runtime.InteropServices;
using System.Web.UI;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Serialization;

using Microsoft.SharePoint;
using Microsoft.SharePoint.WebControls;
using Microsoft.SharePoint.WebPartPages;

using ExcelAggregate.ExcelSvcs; //Web Reference to Excel Web Services
using System.Web.Services.Protocols;

namespace ExcelAggregate
public class ExcelAggregate :
protected override void Render(HtmlTextWriter writer)
// TODO: add custom rendering code here.
// writer.Write("Output HTML");
ExcelService es = new ExcelService();
es.SoapVersion = SoapProtocolVersion.Soap12;
string wkshtName = "Historical";
string tgtBook
= "http://intranet.demo.com/Reports/Excel%20Sheets/2007%20CHI%20-%
//System.Net.NetworkCredential newCred = new
System.Net.NetworkCredential("Administrator", "P@ssw0rd", "DEMO");
es.Credentials =
Status[] outStatus;
string sessionID = es.OpenWorkbook(tgtBook, "en-
US", "en-US", out outStatus);
writer.Write("Session ID: " + sessionID + "<BR>");
object cellVal = es.GetCell(sessionID, wkshtName, 31,
1, true, out outStatus);
catch (SoapException ex)
writer.Write("SOAP Exception Message: {0}<BR><BR>",
writer.Write("SOAP Exception Error Code: {0}",



No Answers Found. Be the First, To Post Answer.

Didn't find what you were looking for? Find more on Excel Services FileOpenAccessDenied Exception Or get search suggestion and latest updates.