Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quick Excel question 1

Status
Not open for further replies.

testare

Programmer
Jan 21, 2005
127
Is it possible to export data from a recordset to excel?

If so do you know any links that can i help me getitng started?

Of course it should be in ASP
 
I have this in my code.
Nothing happens, when this is executed.
Same code in vb works.

Code:
%>
Set ExcelApp = Server.CreateObject("Excel.Application")
ExcelApp.Application.Visible = True
Set ExcelBook = ExcelApp.Workbooks.Add

ExcelBook.Worksheets(1).Cells(2, 2).Font.Name = "Verdana"
ExcelBook.Worksheets(1).Cells(2, 2).Font.Size = 10
ExcelBook.Worksheets(1).Cells(2, 2).Font.Italic = true
ExcelBook.Worksheets(1).Cells(2, 2).Value="Hello world"
ExcelBook.Worksheets(1).Cells(2, 2).HorizontalAlignment = 1
ExcelBook.Worksheets(1).Cells(2, 2).Font.Color = RGB(0,0,0)

ExcelApp.Application.Quit
Set ExcelApp = Nothing 
%>
 
>Nothing happens, when this is executed.
>Same code in vb works.

I don't see instruction to have it saved. How does it mean it works in vb? (Also be sure to set displayalerts to false when save---who is on the server to interact? Similarly, .visible=true is of dubious value.)
 
Excellent, it works now.
Many thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top