View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Mighty Mighty is offline
external usenet poster
 
Posts: 3
Default Printing Excel from an ASP page

Finally got this sorted. Turned out it was fairly simple in the end. I had to
basically add all the network printers that I wanted as local printers and
set them up on TCP/IP ports. That worked fine.


"Mighty" wrote:

Code doesn't raise any errors. It either eventually (after several minutes)
comes up with a "Page cannot be displayed error" or it comes up with "The
time allowed for this script to execute has been exceeded". Neither of these
errors come up on my development machine.

I have also already tried logging in using my own account. I can open any
Excel document and print it without any problems either logged in as
administrator or using my own account. But it still will not print once I
access the program over the web.

I can open the Excel file, write to it and save it but I cannot print it.

"Vergel Adriano" wrote:

Does your code raise any error when it runs against Win2K3 server?

Try to log on locally to the server using the same account that you use when
creating the spreadsheet. Then, launch Excel and print anything. Does it
print? If yes, try it with your code again.


"Mighty" wrote:

Hi Folks,

I am hopeful that someone here will be able to help me as this is racking my
brains. I have developed an ASP program which, when the users submits a form,
opens an Excel page in the background, adds in some data, sends the file to a
printer and then closes the Excel document without saving. That all works
perfectly well on my Windows XP (IIS 5) development PC.

However, when I copy the code over to my webserver (windows server 2003 with
IIS 6) the document won't print. It opens and updates the document (and I can
even save it) but it won't print. I have all the same printers setup on the
webserver as I do on my own PC. I even set up the website to run using the
administrator account in case it was some permissions issue but it still
won't print. The page just sits there for ages and then comes up with a "Page
Cannot Be Displayed" error or "the maximum time for this script has been
exceeded"

If anyone can suggest a solution to this problem, I would really appreciate
it.