Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 5th, 2005, 12:42 AM
Registered User
 
Join Date: Jan 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Printing Excel File in ASP

Hello,
I have the ASP file as follow. There is a problem on printing at client side. The Excel file can't be printed to the default printer at client side after the ASP file is executed.

<HTML><BODY>
<%
Dim objExcel
Dim objWorkBook
Dim objWorkSheet
Dim iLen

Set objExcel = CreateObject("EXCEL.APPLICATION")

ExcelPath = Request.ServerVariables("PATH_TRANSLATED")

While (Right(ExcelPath, 1) <> "\" And Len(ExcelPath) <> 0)
iLen = Len(ExcelPath) -1
ExcelPath = Left(ExcelPath, iLen)
Wend

'....Assign the data.....

Set objWorkBook = objExcel.Workbooks.Open(ExcelPath & "Form.xls")
Set objWorkSheet = objWorkBook.WorkSheets("ABC")

objWorksheet.PrintOut
%>
</BODY></HTML>

Please help!
Thanks in advance.
Reply With Quote
  #2 (permalink)  
Old January 5th, 2005, 12:50 AM
Friend of Wrox
 
Join Date: Dec 2004
Location: Chennai, Tamil nadu, India.
Posts: 307
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Vadivel Send a message via Yahoo to Vadivel
Default

check whether this would be of any use to you: http://www.serverwatch.com/tutorials...le.php/1493501

Best Regards
Vadivel

MVP ASP/ASP.NET
http://vadivel.thinkingms.com
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing .doc file in asp automatically vishalres Classic ASP Professional 3 April 9th, 2007 05:56 PM
Opening Modifying Printing excel File alireza Excel VBA 3 November 18th, 2006 12:59 PM
ASP.NET 2.0 Printing Excel Files lagyossarian ASP.NET 2.0 Basics 0 April 10th, 2006 08:58 AM
export excel file and printing yyjfree Crystal Reports 0 December 13th, 2004 02:44 AM



All times are GMT -4. The time now is 01:46 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.