By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,028 Members | 1,108 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,028 IT Pros & Developers. It's quick & easy.

excel 2003 cannot read asp.net page output

P: n/a
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
Share this Question
Share on Google+
8 Replies


P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
"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

P: n/a
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

P: n/a
"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

P: n/a
>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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.