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

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("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 got to "Dim xls As New Microsoft.Office.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*******@hotmail.com
Jul 21 '05 #1
8 2543
Frank,

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

Something like...

Dim DS As System.Data.DataSet
Dim MyCommand As System.Data.OleDb.OleDbDataAdapter
Dim MyConnection As System.Data.OleDb.OleDbConnection

MyConnection = New System.Data.OleDb.OleDbConnection( _
"provider=Microsoft.Jet.OLEDB.4.0; " & _
"data source=C:\myData.XLS; " & _
"Extended Properties=Excel 8.0;")
' Select the data from Sheet1 of the workbook.
MyCommand = New System.Data.OleDb.OleDbDataAdapter( _
"select * from [Sheet1$]", MyConnection)

DS = New System.Data.DataSet()
MyCommand.Fill(DS)
MyConnection.Close()

"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("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 got to "Dim xls As New Microsoft.Office.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*******@hotmail.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.OleDB namespace

Something like...

Dim DS As System.Data.DataSet
Dim MyCommand As System.Data.OleDb.OleDbDataAdapter
Dim MyConnection As System.Data.OleDb.OleDbConnection

MyConnection = New System.Data.OleDb.OleDbConnection( _
"provider=Microsoft.Jet.OLEDB.4.0; " & _
"data source=C:\myData.XLS; " & _
"Extended Properties=Excel 8.0;")
' Select the data from Sheet1 of the workbook.
MyCommand = New System.Data.OleDb.OleDbDataAdapter( _
"select * from [Sheet1$]", MyConnection)

DS = New System.Data.DataSet()
MyCommand.Fill(DS)
MyConnection.Close()

"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("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 got to "Dim xls As New Microsoft.Office.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*******@hotmail.com

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

exception.tostring() ?

"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.OleDB namespace

Something like...

Dim DS As System.Data.DataSet
Dim MyCommand As System.Data.OleDb.OleDbDataAdapter
Dim MyConnection As System.Data.OleDb.OleDbConnection

MyConnection = New System.Data.OleDb.OleDbConnection( _
"provider=Microsoft.Jet.OLEDB.4.0; " & _
"data source=C:\myData.XLS; " & _
"Extended Properties=Excel 8.0;")
' Select the data from Sheet1 of the workbook.
MyCommand = New System.Data.OleDb.OleDbDataAdapter( _
"select * from [Sheet1$]", MyConnection)

DS = New System.Data.DataSet()
MyCommand.Fill(DS)
MyConnection.Close()

"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("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 got to "Dim xls As New Microsoft.Office.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*******@hotmail.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*******@discussions.microsoft.com> wrote in message
news:78**********************************@microsof t.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("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 got to "Dim xls As New Microsoft.Office.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*******@hotmail.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*******@discussions.microsoft.com> wrote in message
news:78**********************************@microsof t.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("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 got to "Dim xls As New Microsoft.Office.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*******@hotmail.com

Jul 21 '05 #6
"frankvfox" <fr*******@discussions.microsoft.com> wrote in message
news:78**********************************@microsof t.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("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 got to "Dim xls As New Microsoft.Office.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*******@hotmail.com


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

Jul 21 '05 #7
On Wed, 4 Aug 2004 19:57:03 -0700, frankvfox <fr*******@discussions.microsoft.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******@ameritech.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->Administrative 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_Machine 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("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 got to "Dim xls As New Microsoft.Office.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*******@hotmail.com

Jul 21 '05 #9

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

Similar topics

0
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' ...
1
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...
99
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...
476
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...
16
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...
182
by: Jim Hubbard | last post by:
http://www.eweek.com/article2/0,1759,1774642,00.asp
8
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...
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: 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?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.