473,382 Members | 1,202 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Excel Automation in C#....getting "Access Denied" error

Hello. I'm trying to automate Excel in a C# Windows Service. This windows
service has to be able to access files on network shares, so it uses a
domain account on a WinNT 4.0 domain server, rather than the Local Service
or Network Service, or System account. I'm running into a problem, though,
with trying to instantiate Excel. When I execute the following:

using Excel = Microsoft.Office.Interop.Excel;
using Microsoft.Office.Core;

// .....

// Instantiate excel object
Excel.Application myExcel = new Excel.Application();

I recieve an excetion with the message "Access Denied.". I'm assuming this
is due to the fact that I am using a network domain account, rather than a
local system account. I do not, however, know how to solve the problem, or
where to look to find help solving it. Any ideas?
Nov 16 '05 #1
0 1660

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Winterminute | last post by:
If I try to make any changes to the ASP.NET Portal Starter kit it fails with an access denied error. This was working when I left last week and is failing today. I don't remember changing...
6
by: ASP.Confused | last post by:
I have an ASP.NET page writtein in VB that uses ADODB. I just had to force-install MDAC 2.8 after I tried to rollback to 2.6 (my web host uses this, and I wanted to be compatible with them.) I...
0
by: ASP.Confused | last post by:
The old message looked a little stale, so I am re-posting it here. Anybody have any ideas of what I could do?!? The previous responses to this question are below. If you want to look at the...
2
by: ajain1008 | last post by:
I'm running the following code on asp.net form Dim objExcel As Excel.Application Dim objWrkBk As excel.Workbook objExcel = New excel.Application objWrkBk =...
1
by: Jim Heavey | last post by:
Hello, I am using a generic AD Domain Account to create an excel spreadsheet, but I am getting an "Access Denied" error when I attempt to instatiate the excel object. The generic account does is...
1
by: srivatsans101 | last post by:
Hi, I'm trying to access the IFrame contents on a HTML page as frames.document But in IE, I'm getting Access Denied Error Message. I tried to add the IFrame's Src WebSite (a...
0
by: =?Utf-8?B?TW9udGU=?= | last post by:
I am using VB.NET to open and read info from Excel spreadsheets using code similar to this: Dim xlApp As Excel.Application Dim xlBook As Excel.Workbook Dim xlBooks As Excel.Workbooks Dim...
6
by: =?Utf-8?B?UGF1bA==?= | last post by:
I am getting an "Access to the path "xxxx" is denied error. I believe is because the file that I am writing to programatically is being read/written to by another end user. These files have the...
2
by: sbasavar | last post by:
Hi All, In my excel programming, I am using XML http object (MSXML2.XMLHTTP.3.0). Using this object when I try to send a request application throws an "Access is Denied" error. Strange thing...
6
by: passionateforjava | last post by:
Hi All, I am using struts application wherein I need to import file for some purpose.I have used input type="file" for the same which goes like: <input type="file" id="uploadFile" name="uploadFile"...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.