473,395 Members | 2,443 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,395 software developers and data experts.

CreateObject("Excel.Application",MyServer)

KC
Hi,
I have code similar to this..
Dim xlApp As Object
xlApp = CreateObject("Excel.Application", "\\MyServer")

The call is from a asp.net (Intranet) application. \\Myserver is a network
computer in the same domain as web server. The only way I can get this call
worked is when I add the user who logs on to the web site as Administrators.
I need to get this working without having to make the user administrator.
Any suggestion?
Thanks,
CK
Nov 21 '05 #1
5 4718
Hi KC,

You can grant permissions to the user your ASP .NET app runs under to access
the Excel COM server by running dcomcnfg on the "MyServer" machine. For
this, the aforementioned user should be a domain user. You could possibly
also impersonate a domain user with enough permissions before instantiating
and using the Excel object.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"KC" <ch*****@hotmail.com> wrote in message
news:OA**************@TK2MSFTNGP15.phx.gbl...
Hi,
I have code similar to this..
Dim xlApp As Object
xlApp = CreateObject("Excel.Application", "\\MyServer")

The call is from a asp.net (Intranet) application. \\Myserver is a network
computer in the same domain as web server. The only way I can get this
call
worked is when I add the user who logs on to the web site as
Administrators.
I need to get this working without having to make the user administrator.
Any suggestion?
Thanks,
CK


Nov 21 '05 #2
Please do not include VB "classic" newsgroups for a VB.Net question. They're
not the same

Tony Proctor

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:u2**************@TK2MSFTNGP15.phx.gbl...
Hi KC,

You can grant permissions to the user your ASP .NET app runs under to access the Excel COM server by running dcomcnfg on the "MyServer" machine. For
this, the aforementioned user should be a domain user. You could possibly
also impersonate a domain user with enough permissions before instantiating and using the Excel object.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"KC" <ch*****@hotmail.com> wrote in message
news:OA**************@TK2MSFTNGP15.phx.gbl...
Hi,
I have code similar to this..
Dim xlApp As Object
xlApp = CreateObject("Excel.Application", "\\MyServer")

The call is from a asp.net (Intranet) application. \\Myserver is a network computer in the same domain as web server. The only way I can get this
call
worked is when I add the user who logs on to the web site as
Administrators.
I need to get this working without having to make the user administrator. Any suggestion?
Thanks,
CK

Nov 21 '05 #3
On Tue, 28 Sep 2004 13:24:56 -0700, "KC" <ch*****@hotmail.com> wrote:

¤ Hi,
¤ I have code similar to this..
¤ Dim xlApp As Object
¤ xlApp = CreateObject("Excel.Application", "\\MyServer")
¤
¤ The call is from a asp.net (Intranet) application. \\Myserver is a network
¤ computer in the same domain as web server. The only way I can get this call
¤ worked is when I add the user who logs on to the web site as Administrators.
¤ I need to get this working without having to make the user administrator.
¤ Any suggestion?
¤ Thanks,
¤ CK

I would recommend checking out the following article:

INFO: Considerations for Server-Side Automation of Office
http://support.microsoft.com/default...b;en-us;257757
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 21 '05 #4
KC
Yes, I added the domain user under dcomcnfg on MyServer and I am able to
pass CreateObject("Excel.Application",MyServer). But once I do
xlApp.Workbooks.Add(Path), this is where it is choking. The user has access
to "Path" and the excel file..

"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:u2**************@TK2MSFTNGP15.phx.gbl...
Hi KC,

You can grant permissions to the user your ASP .NET app runs under to access the Excel COM server by running dcomcnfg on the "MyServer" machine. For
this, the aforementioned user should be a domain user. You could possibly
also impersonate a domain user with enough permissions before instantiating and using the Excel object.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"KC" <ch*****@hotmail.com> wrote in message
news:OA**************@TK2MSFTNGP15.phx.gbl...
Hi,
I have code similar to this..
Dim xlApp As Object
xlApp = CreateObject("Excel.Application", "\\MyServer")

The call is from a asp.net (Intranet) application. \\Myserver is a network computer in the same domain as web server. The only way I can get this
call
worked is when I add the user who logs on to the web site as
Administrators.
I need to get this working without having to make the user administrator. Any suggestion?
Thanks,
CK

Nov 21 '05 #5
KC
Hi,
I finally got the CreateObject("Excel.Application",\\MyServer) working but I
have another serious problem.
I open the Excel.Application in remoter server and open the workbook and
read and process the data. But the process is done, the Excel instance
doesn't close and it creates a new instance every time. Here is my code.

Please help..

Dim objExcelApp As Excel.Application
Dim objWorkBook As Excel.Workbook
Dim objWorkSheet As Excel.Worksheet
Dim objRange As Excel.Range
objExcelApp = CType(CreateObject("Excel.Application",
ConfigurationSettings.AppSettings("AppServer")), Excel.Application)
objExcelApp.DisplayAlerts = False
objWorkBook = CType(objExcelApp.Workbooks.Add(WorkBookPath), Excel.Workbook)
objWorkSheet =
CType(objWorkBook.Worksheets(ConfigurationSettings .AppSettings("WorkSheetPat
h")), Excel.Worksheet)
''Do the processing......................

ReleaseComObject(objWorkSheet)
ReleaseComObject(objWorkBook)
ReleaseComObject(objExcelApp)

objRange = Nothing
objWorkBook = Nothing
objWorkSheet = Nothing
objExcelApp = nothing

If Not IsNothing(objExcelApp) Then
objExcelApp.DisplayAlerts = False
objExcelApp.Quit()
objExcelApp = Nothing
End If

GC.Collect()


"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:u2**************@TK2MSFTNGP15.phx.gbl...
Hi KC,

You can grant permissions to the user your ASP .NET app runs under to access the Excel COM server by running dcomcnfg on the "MyServer" machine. For
this, the aforementioned user should be a domain user. You could possibly
also impersonate a domain user with enough permissions before instantiating and using the Excel object.

--
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx

"KC" <ch*****@hotmail.com> wrote in message
news:OA**************@TK2MSFTNGP15.phx.gbl...
Hi,
I have code similar to this..
Dim xlApp As Object
xlApp = CreateObject("Excel.Application", "\\MyServer")

The call is from a asp.net (Intranet) application. \\Myserver is a network computer in the same domain as web server. The only way I can get this
call
worked is when I add the user who logs on to the web site as
Administrators.
I need to get this working without having to make the user administrator. Any suggestion?
Thanks,
CK

Nov 21 '05 #6

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

Similar topics

5
by: The Roys | last post by:
Hi Im doing something wrong in quitting the Word.Application in my VB program. I have General Declarations Dim AppWord As Word.Application Form_Load() Set AppWord =...
4
by: Microsoft | last post by:
I'm trying to display a word document inside a web page, but everytime I do I get this error: Error Type: Microsoft VBScript runtime (0x800A0046) Permission denied: 'CreateObject' Does...
2
by: MaxiWheat | last post by:
Hi, I am using a software that uses MS Word to create PDF files. When I try to run the sample code (ASP 3.0), I get an error on this statement : Set oWord =...
4
by: jrasmussen | last post by:
I have created an Excel spreadsheet for the web. When it opens in IE 6.0 I get the message that the format is not supported. This is because it is in tab delimited format. Ane when I save the file,...
2
by: POLILOP | last post by:
When i try to do this Dim ExcelFace Set ExcelFace = CreateObject("Excel.Sheet") ......... the browser says this Error Type: Microsoft VBScript runtime (0x800A0046) Permission denied:...
0
by: Svet | last post by:
CreateObject("Excel.Application") on NT 4.0 hangs and I have to kill the Access 97 app that it is running on. The same code works fine as a stand alone code. This occurs on users' machines thatt...
3
by: John | last post by:
Is there a way to code the button that's available in the query window--microsoft excel icon that exports to excel. I know transferspreadsheet will do this---but I want the query, which is in a...
5
by: KC | last post by:
Hi, I have code similar to this.. Dim xlApp As Object xlApp = CreateObject("Excel.Application", "\\MyServer") The call is from a asp.net (Intranet) application. \\Myserver is a network...
1
by: Raúl Martín | last post by:
I´ve a function in asp that run correctly but If I tried to change it forasp.net in asp: xmlHTTP = CreateObject("Microsoft.XMLHTTP") And I thought to use this sentence for asp.net but the...
1
by: Ultima | last post by:
I'm trying to create an Excel file using a VB program. I have added the reference to Excel Object Library yet when I try to compile it, I get an error at the line exc_app =...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.