473,804 Members | 3,194 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Microsoft Disillusion

I am struggling to export Excel spreadsheets to the client machine in an
ASP.Net application. Everything was great until exporting Excel got into the
act. Documentation on MSDN is so poor regarding this subject it is pathetic.
Following examples on MSDN lead me to using CreateObject("E xcel.Applicatio n")
which of course bombs in .Net! I finally discovered the
Microsoft.Offic e.Interop.Excel object and thought my problems were over.

When I got to "Dim xls As New Microsoft.Offic e.Interop.Excel .Application"
ASP.Net abruptly threw another error saying the ASPNET user account didn't
have permission to use my new found resource. Looking in the User folder I
can't even find ASPNET as a user. (I am strictly a developer and don't know
Shinola about network administrator type duties). My platform is Windows
Small Business Server 2003. Maybe I'm not supposed to be developing on this?

I am an independent contractor and the extent of my frustration and anger at
Microsoft at this stage of the game is immense!

I am also a Certified Partner who can't get any direct help from the
bureaucracy. What a waste of money dealing with Microsoft.

Is there anybody out there who can help me solve this problem? I am at the
end of my rope. My client has been waiting almost a month for my final
version of this thing and I am no closer to a solution than in the beginning.

Maybe I should just scrap everything and learn Java. Are you listening
Ballmer?

How can something so simple become so difficult?

Frank Fox
fr*******@hotma il.com
Jul 21 '05 #1
8 2586
Frank,

You need to look at querying the excel sheet with System.Data.Ole DB namespace

Something like...

Dim DS As System.Data.Dat aSet
Dim MyCommand As System.Data.Ole Db.OleDbDataAda pter
Dim MyConnection As System.Data.Ole Db.OleDbConnect ion

MyConnection = New System.Data.Ole Db.OleDbConnect ion( _
"provider=Micro soft.Jet.OLEDB. 4.0; " & _
"data source=C:\myDat a.XLS; " & _
"Extended Properties=Exce l 8.0;")
' Select the data from Sheet1 of the workbook.
MyCommand = New System.Data.Ole Db.OleDbDataAda pter( _
"select * from [Sheet1$]", MyConnection)

DS = New System.Data.Dat aSet()
MyCommand.Fill( DS)
MyConnection.Cl ose()

"frankvfox" wrote:
I am struggling to export Excel spreadsheets to the client machine in an
ASP.Net application. Everything was great until exporting Excel got into the
act. Documentation on MSDN is so poor regarding this subject it is pathetic.
Following examples on MSDN lead me to using CreateObject("E xcel.Applicatio n")
which of course bombs in .Net! I finally discovered the
Microsoft.Offic e.Interop.Excel object and thought my problems were over.

When I got to "Dim xls As New Microsoft.Offic e.Interop.Excel .Application"
ASP.Net abruptly threw another error saying the ASPNET user account didn't
have permission to use my new found resource. Looking in the User folder I
can't even find ASPNET as a user. (I am strictly a developer and don't know
Shinola about network administrator type duties). My platform is Windows
Small Business Server 2003. Maybe I'm not supposed to be developing on this?

I am an independent contractor and the extent of my frustration and anger at
Microsoft at this stage of the game is immense!

I am also a Certified Partner who can't get any direct help from the
bureaucracy. What a waste of money dealing with Microsoft.

Is there anybody out there who can help me solve this problem? I am at the
end of my rope. My client has been waiting almost a month for my final
version of this thing and I am no closer to a solution than in the beginning.

Maybe I should just scrap everything and learn Java. Are you listening
Ballmer?

How can something so simple become so difficult?

Frank Fox
fr*******@hotma il.com

Jul 21 '05 #2
Chris,

Thanks for the thoughtful reply. You put some effort into this and I
appreciate it.
I can't even create an Excel object let alone query it after birth.

This weird "access denied" message has me beat.

Thanks again.

Frank

"chrisrock" wrote:
Frank,

You need to look at querying the excel sheet with System.Data.Ole DB namespace

Something like...

Dim DS As System.Data.Dat aSet
Dim MyCommand As System.Data.Ole Db.OleDbDataAda pter
Dim MyConnection As System.Data.Ole Db.OleDbConnect ion

MyConnection = New System.Data.Ole Db.OleDbConnect ion( _
"provider=Micro soft.Jet.OLEDB. 4.0; " & _
"data source=C:\myDat a.XLS; " & _
"Extended Properties=Exce l 8.0;")
' Select the data from Sheet1 of the workbook.
MyCommand = New System.Data.Ole Db.OleDbDataAda pter( _
"select * from [Sheet1$]", MyConnection)

DS = New System.Data.Dat aSet()
MyCommand.Fill( DS)
MyConnection.Cl ose()

"frankvfox" wrote:
I am struggling to export Excel spreadsheets to the client machine in an
ASP.Net application. Everything was great until exporting Excel got into the
act. Documentation on MSDN is so poor regarding this subject it is pathetic.
Following examples on MSDN lead me to using CreateObject("E xcel.Applicatio n")
which of course bombs in .Net! I finally discovered the
Microsoft.Offic e.Interop.Excel object and thought my problems were over.

When I got to "Dim xls As New Microsoft.Offic e.Interop.Excel .Application"
ASP.Net abruptly threw another error saying the ASPNET user account didn't
have permission to use my new found resource. Looking in the User folder I
can't even find ASPNET as a user. (I am strictly a developer and don't know
Shinola about network administrator type duties). My platform is Windows
Small Business Server 2003. Maybe I'm not supposed to be developing on this?

I am an independent contractor and the extent of my frustration and anger at
Microsoft at this stage of the game is immense!

I am also a Certified Partner who can't get any direct help from the
bureaucracy. What a waste of money dealing with Microsoft.

Is there anybody out there who can help me solve this problem? I am at the
end of my rope. My client has been waiting almost a month for my final
version of this thing and I am no closer to a solution than in the beginning.

Maybe I should just scrap everything and learn Java. Are you listening
Ballmer?

How can something so simple become so difficult?

Frank Fox
fr*******@hotma il.com

Jul 21 '05 #3
What is the full exception error?

exception.tostr ing() ?

"frankvfox" wrote:
Chris,

Thanks for the thoughtful reply. You put some effort into this and I
appreciate it.
I can't even create an Excel object let alone query it after birth.

This weird "access denied" message has me beat.

Thanks again.

Frank

"chrisrock" wrote:
Frank,

You need to look at querying the excel sheet with System.Data.Ole DB namespace

Something like...

Dim DS As System.Data.Dat aSet
Dim MyCommand As System.Data.Ole Db.OleDbDataAda pter
Dim MyConnection As System.Data.Ole Db.OleDbConnect ion

MyConnection = New System.Data.Ole Db.OleDbConnect ion( _
"provider=Micro soft.Jet.OLEDB. 4.0; " & _
"data source=C:\myDat a.XLS; " & _
"Extended Properties=Exce l 8.0;")
' Select the data from Sheet1 of the workbook.
MyCommand = New System.Data.Ole Db.OleDbDataAda pter( _
"select * from [Sheet1$]", MyConnection)

DS = New System.Data.Dat aSet()
MyCommand.Fill( DS)
MyConnection.Cl ose()

"frankvfox" wrote:
I am struggling to export Excel spreadsheets to the client machine in an
ASP.Net application. Everything was great until exporting Excel got into the
act. Documentation on MSDN is so poor regarding this subject it is pathetic.
Following examples on MSDN lead me to using CreateObject("E xcel.Applicatio n")
which of course bombs in .Net! I finally discovered the
Microsoft.Offic e.Interop.Excel object and thought my problems were over.

When I got to "Dim xls As New Microsoft.Offic e.Interop.Excel .Application"
ASP.Net abruptly threw another error saying the ASPNET user account didn't
have permission to use my new found resource. Looking in the User folder I
can't even find ASPNET as a user. (I am strictly a developer and don't know
Shinola about network administrator type duties). My platform is Windows
Small Business Server 2003. Maybe I'm not supposed to be developing on this?

I am an independent contractor and the extent of my frustration and anger at
Microsoft at this stage of the game is immense!

I am also a Certified Partner who can't get any direct help from the
bureaucracy. What a waste of money dealing with Microsoft.

Is there anybody out there who can help me solve this problem? I am at the
end of my rope. My client has been waiting almost a month for my final
version of this thing and I am no closer to a solution than in the beginning.

Maybe I should just scrap everything and learn Java. Are you listening
Ballmer?

How can something so simple become so difficult?

Frank Fox
fr*******@hotma il.com

Jul 21 '05 #4
Hi Frank,

The framework is vast, and while the Microsoft documentation is actually
very detailed. However, if you don't know what you are searching for then
finding it in MSDN is frustrating to say the least. The best tip I can give
you is to try Google, this will at a minimum provide you with a better
vocabulary with which to search MSDN. For example I didn't know anything
about your specific challenge. However after searching Google with -
asp.net export excel - I now know a whole lot about it. As a matter of fact
the first hundred or so links take you directly to code examples that you
can download and run.

Your best bet is to run that search. Create a very scaled down, simple
example of what you are trying to do and see if it works. Then if it
doesn't post back here with code. When you post back be sure to make clear
which line of code your application is bombing on and the exact wording of
the error you are getting. Armed with that the people on the group will be
in a much better position to help you. (Many will probably go straight to
Google and search based on the information you would have just provided.)
You also need to be clear on what you are trying to accomplish. Your
description is that you want to "export Excel spreadsheets to the client
machine". Do you mean that you have spreadsheets on the server and you want
to query them for a subset of data and display this data in a web page? Or
are you trying to move an Excel file? Good luck! Ken.

"frankvfox" <fr*******@disc ussions.microso ft.com> wrote in message
news:78******** *************** ***********@mic rosoft.com...
I am struggling to export Excel spreadsheets to the client machine in an
ASP.Net application. Everything was great until exporting Excel got into the act. Documentation on MSDN is so poor regarding this subject it is pathetic. Following examples on MSDN lead me to using CreateObject("E xcel.Applicatio n") which of course bombs in .Net! I finally discovered the
Microsoft.Offic e.Interop.Excel object and thought my problems were over.

When I got to "Dim xls As New Microsoft.Offic e.Interop.Excel .Application"
ASP.Net abruptly threw another error saying the ASPNET user account didn't
have permission to use my new found resource. Looking in the User folder I
can't even find ASPNET as a user. (I am strictly a developer and don't know Shinola about network administrator type duties). My platform is Windows
Small Business Server 2003. Maybe I'm not supposed to be developing on this?
I am an independent contractor and the extent of my frustration and anger at Microsoft at this stage of the game is immense!

I am also a Certified Partner who can't get any direct help from the
bureaucracy. What a waste of money dealing with Microsoft.

Is there anybody out there who can help me solve this problem? I am at the
end of my rope. My client has been waiting almost a month for my final
version of this thing and I am no closer to a solution than in the beginning.
Maybe I should just scrap everything and learn Java. Are you listening
Ballmer?

How can something so simple become so difficult?

Frank Fox
fr*******@hotma il.com

Jul 21 '05 #5
Amigo, you're a Certified Partner. You can go right to the source. Did you
misfile the materials you got from Microsoft telling you how to open an
incident with MS under your partnership agreement?

I'm just a regular old everyday MSDN Universal subscriber and I can do this
by just picking up the telephone, up to four times a year, and I get all the
way in to the development team when I need to, and they keep calling me back
until we solve my problem. You can too once you get off your high horse.

Really,
Tom Dacon
Dacon Software Consulting

"frankvfox" <fr*******@disc ussions.microso ft.com> wrote in message
news:78******** *************** ***********@mic rosoft.com...
I am struggling to export Excel spreadsheets to the client machine in an
ASP.Net application. Everything was great until exporting Excel got into the act. Documentation on MSDN is so poor regarding this subject it is pathetic. Following examples on MSDN lead me to using CreateObject("E xcel.Applicatio n") which of course bombs in .Net! I finally discovered the
Microsoft.Offic e.Interop.Excel object and thought my problems were over.

When I got to "Dim xls As New Microsoft.Offic e.Interop.Excel .Application"
ASP.Net abruptly threw another error saying the ASPNET user account didn't
have permission to use my new found resource. Looking in the User folder I
can't even find ASPNET as a user. (I am strictly a developer and don't know Shinola about network administrator type duties). My platform is Windows
Small Business Server 2003. Maybe I'm not supposed to be developing on this?
I am an independent contractor and the extent of my frustration and anger at Microsoft at this stage of the game is immense!

I am also a Certified Partner who can't get any direct help from the
bureaucracy. What a waste of money dealing with Microsoft.

Is there anybody out there who can help me solve this problem? I am at the
end of my rope. My client has been waiting almost a month for my final
version of this thing and I am no closer to a solution than in the beginning.
Maybe I should just scrap everything and learn Java. Are you listening
Ballmer?

How can something so simple become so difficult?

Frank Fox
fr*******@hotma il.com

Jul 21 '05 #6
"frankvfox" <fr*******@disc ussions.microso ft.com> wrote in message
news:78******** *************** ***********@mic rosoft.com...
I am struggling to export Excel spreadsheets to the client machine in an
ASP.Net application. Everything was great until exporting Excel got into the act. Documentation on MSDN is so poor regarding this subject it is pathetic. Following examples on MSDN lead me to using CreateObject("E xcel.Applicatio n") which of course bombs in .Net! I finally discovered the
Microsoft.Offic e.Interop.Excel object and thought my problems were over.

When I got to "Dim xls As New Microsoft.Offic e.Interop.Excel .Application"
ASP.Net abruptly threw another error saying the ASPNET user account didn't
have permission to use my new found resource. Looking in the User folder I
can't even find ASPNET as a user. (I am strictly a developer and don't know Shinola about network administrator type duties). My platform is Windows
Small Business Server 2003. Maybe I'm not supposed to be developing on this?
I am an independent contractor and the extent of my frustration and anger at Microsoft at this stage of the game is immense!

I am also a Certified Partner who can't get any direct help from the
bureaucracy. What a waste of money dealing with Microsoft.

Is there anybody out there who can help me solve this problem? I am at the
end of my rope. My client has been waiting almost a month for my final
version of this thing and I am no closer to a solution than in the beginning.
Maybe I should just scrap everything and learn Java. Are you listening
Ballmer?

How can something so simple become so difficult?

Frank Fox
fr*******@hotma il.com


http://www.codeproject.com/csharp/csharp_excel.asp

Jul 21 '05 #7
On Wed, 4 Aug 2004 19:57:03 -0700, frankvfox <fr*******@disc ussions.microso ft.com> wrote:

¤ Chris,
¤
¤ Thanks for the thoughtful reply. You put some effort into this and I
¤ appreciate it.
¤ I can't even create an Excel object let alone query it after birth.
¤
¤ This weird "access denied" message has me beat.
¤

It's a permissions issue. Depending upon the type of authentication you are using (if any) for your
web application it's likely the account (probably ASPNET) does not have sufficient access to the
file resource/folder.

In addition, I would discourage any attempts to use Office applications via automation on the server
side. See the following:

INFO: Considerations for Server-Side Automation of Office
http://support.microsoft.com/default...b;en-us;257757
Paul ~~~ pc******@amerit ech.net
Microsoft MVP (Visual Basic)
Jul 21 '05 #8
Hi Frank,

I believe your issue has to do with the IIS setup in your machine. There
are two distinct user permission groups which should concern you:

ASPNetUser ( IUser)

"frankvfox" wrote:

Choose Start ->Control Panel->Administrati ve Tools->Internet Information
Services (IIS)

Exapand the tree view and locate the folder where your application resides.
->Right Click Choose Properties
->Choose Directory Securities
->Choose Edit
->check box "Anonymous Access" Click Browse
in the next pop up window Choose "Advanced"
in the next pop up (select User) window, click "Find Now"
In the open window there should appear a list of "Users" on your computer's
iis system, one of those users is "IUSR_Machi ne Name"
Highlight that user and click "OK"
Continue to click OK until you are back to only the IIS Window.

If you have further problems with this, feel free to email me.
ad***@aspwired. com

I am struggling to export Excel spreadsheets to the client machine in an
ASP.Net application. Everything was great until exporting Excel got into the
act. Documentation on MSDN is so poor regarding this subject it is pathetic.
Following examples on MSDN lead me to using CreateObject("E xcel.Applicatio n")
which of course bombs in .Net! I finally discovered the
Microsoft.Offic e.Interop.Excel object and thought my problems were over.

When I got to "Dim xls As New Microsoft.Offic e.Interop.Excel .Application"
ASP.Net abruptly threw another error saying the ASPNET user account didn't
have permission to use my new found resource. Looking in the User folder I
can't even find ASPNET as a user. (I am strictly a developer and don't know
Shinola about network administrator type duties). My platform is Windows
Small Business Server 2003. Maybe I'm not supposed to be developing on this?

I am an independent contractor and the extent of my frustration and anger at
Microsoft at this stage of the game is immense!

I am also a Certified Partner who can't get any direct help from the
bureaucracy. What a waste of money dealing with Microsoft.

Is there anybody out there who can help me solve this problem? I am at the
end of my rope. My client has been waiting almost a month for my final
version of this thing and I am no closer to a solution than in the beginning.

Maybe I should just scrap everything and learn Java. Are you listening
Ballmer?

How can something so simple become so difficult?

Frank Fox
fr*******@hotma il.com

Jul 21 '05 #9

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

Similar topics

0
395
by: Karuppasamy | last post by:
H I am trying to use the Logging Module provided by Microsoft Application Blocks for .Net I installed everything as per the Instructions given in the 'Development Using the Logging Block' But when i am trying to run the sample, i am getting the following error in the Event Viwer Kindly help me on this
1
2976
by: Novice | last post by:
Hi all, I am a C++ and Java developer with over 3 years of industry experience. I've written low level C++ code, in addition to web clients that use web services. I've just recently installed the Visual Studio .net Professional trial version 2003. I have been reading up various documents that discuss - "What is Microsoft .Net" and have found some enlightening information. I'm trying to write a paper on security and software...
99
6254
by: Jim Hubbard | last post by:
It seems that Microsoft not only does not need the classic Visual Basic developer army (the largest army of developers the world has ever seen), but now they don't need ANY Windows developer at a small or mid-sized business. http://groups-beta.google.com/group/microsoft.public.msdn.general/browse_thread/thread/9d7e8f9a00c1c7da/459ca99eb0e7c328?q=%22Proposed+MSDN+subscription+changes%22&rnum=1#459ca99eb0e7c328 Damn! To be that...
476
18575
by: Xah Lee | last post by:
Microsoft Hatred, FAQ Xah Lee, 20020518 Question: U.S. Judges are not morons, and quite a few others are not morons. They find MS guilty, so it must be true. Answer: so did the German population thought Jews are morons by heritage, to the point that Jews should be exterminated from earth. Apparently, the entire German population cannot be morons, they must be
16
7548
by: ShadowOfTheBeast | last post by:
Hi all, is there any one who have developed an application in c# using a text-speech engine using the Microsoft Speech SDK 5.1 especially using visual studio.net IDE 2003 (v7.1) I seem to get an inter-op compiling error and cant seem to resolve it! help! -- The Matrix Insurrection
182
7574
by: Jim Hubbard | last post by:
http://www.eweek.com/article2/0,1759,1774642,00.asp
8
291
by: frankvfox | last post by:
I am struggling to export Excel spreadsheets to the client machine in an ASP.Net application. Everything was great until exporting Excel got into the act. Documentation on MSDN is so poor regarding this subject it is pathetic. Following examples on MSDN lead me to using CreateObject("Excel.Application") which of course bombs in .Net! I finally discovered the Microsoft.Office.Interop.Excel object and thought my problems were over. When I...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9579
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10578
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10077
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9152
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4300
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3820
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2991
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.