473,385 Members | 1,620 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,385 software developers and data experts.

excel 2003 cannot read asp.net page output

I created an ASP.net page which opens excel. The data opens up
correctly in MS office Excel 2007 but when we use a mahcine with MS
Office 2003 we encountered a message, "Cannot read output file" Is
this caused by the Cridview or does anyone know what causes this.

Thank in advance.

May 18 '07 #1
8 1894
re:
!>I created an ASP.net page which opens excel.

Calling Mark Rae!

:-)

That is a *really* bad idea!

Just imagine what will happen if 100 users each open an instance of Excel on your server.


Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
======================================
"Fendi Baba" <ef*****@epitome.com.sgwrote in message
news:11**********************@w5g2000hsg.googlegro ups.com...
>I created an ASP.net page which opens excel. The data opens up
correctly in MS office Excel 2007 but when we use a mahcine with MS
Office 2003 we encountered a message, "Cannot read output file" Is
this caused by the Cridview or does anyone know what causes this.

Thank in advance.

May 18 '07 #2
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:uX**************@TK2MSFTNGP03.phx.gbl...
re:
!>I created an ASP.net page which opens excel.

Calling Mark Rae!
You rang, my Lord...?
That is a *really* bad idea!
And here's why:
http://support.microsoft.com/default...US;q257757#kb2
--
http://www.markrae.net

May 18 '07 #3
But i can perfectly imagine that an application uses excel as database. We
do that in a special application where nothing else can be used as database
for several reasons? And it works perfectly.

Ok to tell your point of view, but Fendi expects also an answer to his
problem.

So instead of typically answering the question by a lot of considerations
(true or not), you should also give an answer:
why this error with excel 2003? What if Fendi must use excel for a lot of
reaons? You give now the impression that one must be a fool to do that.


"Mark Rae" <ma**@markNOSPAMrae.netschreef in bericht
news:Oc**************@TK2MSFTNGP06.phx.gbl...
"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:uX**************@TK2MSFTNGP03.phx.gbl...
>re:
!>I created an ASP.net page which opens excel.

Calling Mark Rae!

You rang, my Lord...?
>That is a *really* bad idea!

And here's why:
http://support.microsoft.com/default...US;q257757#kb2
--
http://www.markrae.net

May 18 '07 #4
"Charles" <ch@xx.xxwrote in message
news:uT****************@TK2MSFTNGP05.phx.gbl...
But i can perfectly imagine that an application uses excel as database.
Absolutely! There's an Excel OleDb driver for that...
So instead of typically answering the question by a lot of considerations
(true or not), you should also give an answer:
why this error with excel 2003?
If you (re)read the OP, you'll see that he mentions that he's trying to
"open" Excel through ASP.NET - no mention of using Excel as an ADO.NET
datasource...

If the OP is trying to use server-side automation from ASP.NET, it is
virtually guaranteed not to work in a production environment...
What if Fendi must use excel for a lot of reaons?
Then, if he needs to do anything more than use Excel as an ADO.NET
datasource, he needs to use either OfficeXML or Aspose...
You give now the impression that one must be a fool to do that.
I never said he was a fool - I merely pointed out that server-side
automation from ASP.NET is actively discouraged by Microsoft because it
doesn't work; furthermore they actually will refuse to support any
application which even tries to use it:
http://support.microsoft.com/default...US;q257757#kb2

I'm not making this up, nor am I trying to irritate anyone by telling them
that what they're trying to do is not going to work...

Juan was just having a little dig at me - that's cool... :-)

But don't shoot the messenger...
--
http://www.markrae.net

May 18 '07 #5
That's a good point you've made. In the cases that I run across, there is no
better way than to automate Excel on the server. It can be done in a way
that provides efficient throughput bearing in mind that is swimming with the
aligators.
>"Cannot read output file"
This is usually a permissions error. Couple things. Double-click on an
office file on the sick machine, see if that opens correctly. If it doesn't,
you'll need to re-install Office 2003.

Go ahead and re-install Office 2003 on the sick machine just for grins. Make
sure the Office PIAs are installed as well.

Alternatively, your next best better is to debug it. First try looking at
eventvwr to see what specific issue if any is occuring. It may typically be
related to the worker process not having sufficient rights.

If this fails, you will need to set your application to break on all
exceptions. Attach the debugger and wait till the automation event throws
and then step through the debugger to see what the issue is.
--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
https://www.microsoft.com/MSPress/books/10933.aspx
OWC Black Book www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
"Charles" <ch@xx.xxwrote in message
news:uT****************@TK2MSFTNGP05.phx.gbl...
But i can perfectly imagine that an application uses excel as database. We
do that in a special application where nothing else can be used as
database for several reasons? And it works perfectly.

Ok to tell your point of view, but Fendi expects also an answer to his
problem.

So instead of typically answering the question by a lot of considerations
(true or not), you should also give an answer:
why this error with excel 2003? What if Fendi must use excel for a lot of
reaons? You give now the impression that one must be a fool to do that.


"Mark Rae" <ma**@markNOSPAMrae.netschreef in bericht
news:Oc**************@TK2MSFTNGP06.phx.gbl...
>"Juan T. Llibre" <no***********@nowhere.comwrote in message
news:uX**************@TK2MSFTNGP03.phx.gbl...
>>re:
!>I created an ASP.net page which opens excel.

Calling Mark Rae!

You rang, my Lord...?
>>That is a *really* bad idea!

And here's why:
http://support.microsoft.com/default...US;q257757#kb2
--
http://www.markrae.net


May 18 '07 #6
"Alvin Bruney [MVP]" <some guy without an email addresswrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
That's a good point you've made. In the cases that I run across, there is
no better way than to automate Excel on the server. It can be done in a
way that provides efficient throughput bearing in mind that is swimming
with the aligators.
Just to clarify, Alvin, are you actually advising somebody (in your capacity
as MVP) to follow a procedure which Microsoft themselves will not
support...?
--
http://www.markrae.net

May 18 '07 #7
>Just to clarify, Alvin, are you actually advising somebody (in your
>capacity as MVP) to follow a procedure which Microsoft themselves will not
support...?

Wow, strong words. Yes I am. You tell kids not to play with fire because
fire can hurt them pretty bad right? Turns out, fire can be extremely
helpfull if you know how to use it. Sure, MS does not support server side
automation of Excel. I'm not arguing that, I'm saying there are ways to
automate Excel on the server if you operate between the limits - I spell out
those limits and let the developer decide after they understand that MS will
not provide support. That hasn't stopped people from automating Excel on the
server because there is a need that MS is yet to provide leadership on. Sure
there are products from MS that avoid the pitfalls but each is mired in
licensing that put those solutions out of the reach of common developer
shops. That's why you'll see a thread every week about excel automation in
here.

FWIW, you should not automate Excel on the server, it's single threaded and
ASP.NET runs on an MTS threadpool that, in essense, is the crux of the
matter. Ok, i've said enough and I'm certain to get into hot water for it...

--
Regards,
Alvin Bruney
------------------------------------------------------
Shameless author plug
Excel Services for .NET is coming...
https://www.microsoft.com/MSPress/books/10933.aspx
OWC Black Book www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley
"Mark Rae" <ma**@markNOSPAMrae.netwrote in message
news:u4**************@TK2MSFTNGP04.phx.gbl...
"Alvin Bruney [MVP]" <some guy without an email addresswrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>That's a good point you've made. In the cases that I run across, there is
no better way than to automate Excel on the server. It can be done in a
way that provides efficient throughput bearing in mind that is swimming
with the aligators.

Just to clarify, Alvin, are you actually advising somebody (in your
capacity as MVP) to follow a procedure which Microsoft themselves will not
support...?
--
http://www.markrae.net

May 19 '07 #8
Thanks for the lively discussion. I am new to dot.net and I appreciate
the concern shown by everyone regarding the Excel automation. In this
instance, I am not using a server-side automation. I had merely places
the header in the page to ahev the following line

Response.ContentType = "application/vnd.ms-excel"
I had posted another thread with the full code:

http://groups.google.com/group/micro...54e707aff0ce1d
Any ideas on what went wrong with MS Excel 2003 will be much
appreciated.

Regards

May 19 '07 #9

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

Similar topics

3
by: hari krishna | last post by:
hi, I am generating excel reports through vb.Net. After creating excel.application and the report is generated, each report leaves Excel in memory. I can see them in task manager in Process tab...
3
by: Rik Moed | last post by:
Hi, I am having a problem with Excel 2003 worksheets when I upload them using the HtmlIputFile. After the upload, I start to download the worksheet and it appears to be currupt. I recieve the...
1
by: Anonieko | last post by:
Here are some of the approaches. 1. Transform DataGrid http://www.dotnetjohn.com/articles.aspx?articleid=36 3. Use the Export approach ...
0
by: Ned Balzer | last post by:
I have a puzzling problem. I am using some code I found in another thread here to output the results of a gridview to excel. Here is the subroutine: Sub SendToExcel(ByVal Source As Object,...
5
by: =?Utf-8?B?U3R1YXJ0?= | last post by:
Hi There I have been having a play around with the following code to display a datagrid in Excel (all from Steve Orr's site): Private Sub btnTechServAccred_Click(ByVal sender As System.Object,...
0
by: Fendi Baba | last post by:
I created an ASP.net page which opens excel. This works fine in Office 2007. However, Excel 2003 runs in an error which states "cannot read output file". Hee is the VB code and below is the ASPX...
1
by: cehether | last post by:
Hello everyone. I am trying to export the contents of a DataGrid to MS Excel using VB.NET 2003. I read of a couple different ways of doing that here (though I couldn't tell which version of...
18
by: Paul Lautman | last post by:
JRough wrote: What do you mean by "redirect the output to Excel"??? Excel isn't a location, it's a spreadsheet program that some (but not all users) will have on their machine. BTW, Location:...
0
by: =?Utf-8?B?ZGlzcGxheW5hbWU=?= | last post by:
The following code used to outputs to Excel 2003 fine. Do I need to change it to output to Excel 2007? <% Response.ContentType = "application/vnd.ms-excel" Response.AddHeader...
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: 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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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...

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.