Click here to Skip to main content
15,893,814 members
Home / Discussions / C#
   

C#

 
AnswerRe: Excel file creation and saving in Windows Service doesn't work. Pin
Abhinav S27-Nov-13 22:10
Abhinav S27-Nov-13 22:10 
GeneralRe: Excel file creation and saving in Windows Service doesn't work. Pin
emma.sun.sts27-Nov-13 22:24
emma.sun.sts27-Nov-13 22:24 
GeneralRe: Excel file creation and saving in Windows Service doesn't work. Pin
Pete O'Hanlon27-Nov-13 22:30
mvePete O'Hanlon27-Nov-13 22:30 
GeneralRe: Excel file creation and saving in Windows Service doesn't work. Pin
emma.sun.sts27-Nov-13 23:07
emma.sun.sts27-Nov-13 23:07 
GeneralRe: Excel file creation and saving in Windows Service doesn't work. Pin
Pete O'Hanlon27-Nov-13 23:18
mvePete O'Hanlon27-Nov-13 23:18 
GeneralRe: Excel file creation and saving in Windows Service doesn't work. Pin
emma.sun.sts27-Nov-13 23:30
emma.sun.sts27-Nov-13 23:30 
AnswerRe: Excel file creation and saving in Windows Service doesn't work. Pin
Richard Deeming28-Nov-13 1:01
mveRichard Deeming28-Nov-13 1:01 
GeneralRe: Excel file creation and saving in Windows Service doesn't work. Pin
emma.sun.sts28-Nov-13 14:53
emma.sun.sts28-Nov-13 14:53 
It is quite a useful blog post have given here http://bharathkumaran.wordpress.com/2011/10/25/running-excel-from-a-windows-service/[^]

I followed it.
- I created C:\Windows\SysWOW64\config\systemprofile\Desktop.
- I tried to change DCOMConfig settings. I couldn't find Microsoft Excel Application.
- So I followed another link - http://social.technet.microsoft.com/Forums/windows/en-US/dde69147-a01a-4eb1-8ea9-31adbf874bed/microsoft-excel-application-entry-missing-in-dcomcnfg
- although we have slightly different applications, I decided to do these

Quote:Solved!

1. In DCOMCNFG, right click on the My Computer and select properties. 
2. Choose the COM Securities tab
3. In Access Permissions, click "Edit Defaults" and add Network Service to it and give it "Allow local access" permission. Do the same for \Users.
4. In launch and Activation Permissions, click "Edit Defaults" and add Network Service to it and give it "Local launch" and "Local Activation" permission. Do the same for \Users


Now when I run the windows service again, I have a different error such as

createXLS error 1: System.Runtime.InteropServices.COMException (0x800A03EC): Exception from HRESULT: 0x800A03EC
   at Microsoft.Office.Interop.Excel.Workbooks.Add(Object Template)
   at UPNP_WS_Weekly.UpnpWeeklyMailService.createXLS(String dir) in c:\Users\Documents\Visual Studio 2013\Projects\UPNP_WS_Weekly\UPNP_WS_Weekly\Service1.cs:line 218


Line 218 is at
xlWorkBook = xlApp.Workbooks.Add(misValue);


I don't know if I should be happy getting a different error.
GeneralRe: Excel file creation and saving in Windows Service doesn't work. Pin
emma.sun.sts28-Nov-13 15:19
emma.sun.sts28-Nov-13 15:19 
SuggestionRe: Excel file creation and saving in Windows Service doesn't work. Pin
Eddy Vluggen28-Nov-13 10:16
professionalEddy Vluggen28-Nov-13 10:16 
GeneralRe: Excel file creation and saving in Windows Service doesn't work. Pin
emma.sun.sts28-Nov-13 14:46
emma.sun.sts28-Nov-13 14:46 
Questionguidance on supplying credentials to the server via sockets for login to the server Pin
Arjun Mourya27-Nov-13 1:56
Arjun Mourya27-Nov-13 1:56 
AnswerRe: guidance on supplying credentials to the server via sockets for login to the server Pin
Nicholas Marty27-Nov-13 3:59
professionalNicholas Marty27-Nov-13 3:59 
AnswerRe: guidance on supplying credentials to the server via sockets for login to the server Pin
Dave Kreskowiak27-Nov-13 5:11
mveDave Kreskowiak27-Nov-13 5:11 
AnswerRe: guidance on supplying credentials to the server via sockets for login to the server Pin
Eddy Vluggen27-Nov-13 7:11
professionalEddy Vluggen27-Nov-13 7:11 
Questionc# listview Pin
Member 1026351927-Nov-13 1:46
Member 1026351927-Nov-13 1:46 
GeneralRe: c# listview Pin
harold aptroot27-Nov-13 4:54
harold aptroot27-Nov-13 4:54 
AnswerRe: c# listview Pin
Eddy Vluggen27-Nov-13 7:20
professionalEddy Vluggen27-Nov-13 7:20 
GeneralRe: c# listview Pin
Member 1026351927-Nov-13 19:11
Member 1026351927-Nov-13 19:11 
GeneralRe: c# listview Pin
Eddy Vluggen28-Nov-13 9:35
professionalEddy Vluggen28-Nov-13 9:35 
QuestionC# code to relate two nodes Pin
AshwiniSH26-Nov-13 19:33
professionalAshwiniSH26-Nov-13 19:33 
AnswerRe: C# code to relate two nodes Pin
Bernhard Hiller26-Nov-13 21:11
Bernhard Hiller26-Nov-13 21:11 
GeneralRe: C# code to relate two nodes Pin
AshwiniSH26-Nov-13 21:59
professionalAshwiniSH26-Nov-13 21:59 
AnswerRe: C# code to relate two nodes Pin
OriginalGriff26-Nov-13 23:13
mveOriginalGriff26-Nov-13 23:13 
AnswerRe: C# code to relate two nodes Pin
Richard MacCutchan27-Nov-13 0:28
mveRichard MacCutchan27-Nov-13 0:28 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.