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.
|