LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem on the ASP using the Excel.Application Object

Hi, All:
I want to use excel component in the ASP.
My code is that
-----------------------------------------------------------
Dim oExcel As Object
Dim oBook As Object
Dim oSheet As Object

'Start a new workbook in Excel
Set oExcel = CreateObject("Excel.Application")
Set oBook = oExcel.Workbooks.Add

'Add headers to the worksheet on row 1
Set oSheet = oBook.Worksheets(1)
oSheet.Range("A1:C1").Value = Array("ORD0001", "Amount", "Tax")

'oSheet.Range("A2:A100").
oSheet.Range("A1").FormatConditions.Add(xlCellValu e, xlEqual,
"ORD0001").Font.Bold = True


'Save the Workbook and Quit Excel
oBook.SaveAs "C:\Book1.xls"
oExcel.Quit
-------------------------------------------------------
But the function FormatConditions seems no use.


So I test this code in Visual Basic 6.0. I find the error is that

oSheet.Range("A1").FormatConditions.Add(xlCellValu e, xlEqual,
"ORD0001").Font.Bold = True

Run-time error 5: invalidate procedure call or argument


Then I open the menu Project - Preference, and add the "Microsoft Excel
10.0 Object Library".


Then the visual basic code could run successfully.

---------------------------------------------------------
My question is that.
How to make the ASP code run ?
How to add the "Microsoft Excel 10.0 Object Library" in asp using the above
code?

Thanks
















 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Late Binding issue with Excel.Application object [email protected][_2_] Excel Discussion (Misc queries) 2 August 4th 09 08:10 AM
cannot start the source application for this object in excel Philip Mollica Charts and Charting in Excel 3 May 27th 06 02:46 AM
"Excel.Application" Object Model Shaker Charts and Charting in Excel 2 January 9th 05 10:24 AM
How do I protect my hidden Excel.Application object from unwanted user interaction. wijwoj Excel Programming 0 October 30th 03 04:49 PM
Diplaying Excel Application through Object Model Bob Phillips[_5_] Excel Programming 1 August 13th 03 03:39 PM


All times are GMT +1. The time now is 09:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"