You cant actually send a report to XL, but you can send the underlying data
as a recordset and then use and XL object to format the spreadsheet to the
extent required. You actually have more functionality in this regard than
you have with a report but you will need to do som VBA programming.
A few key VBA statements that you should investigate if you want to attempt
this follow.
Dim objXL As Object
Dim objWkb As Object
Dim objSht As Object
Dim rs as Recordset
Set objXL = CreateObject("Excel.Application")
Set objSht = objWkb.Worksheets("sheet1")
objXL.Cells(2, 1).CopyFromRecordset rs
(That last statement copies all of the data from the recordset called rs to
a new XL sheet, starting at cell 2,1.)
Dont try and run this code. I have just copied a few lines from a much
longer program to get you started.
"ShyGuy" <sh****@shytown.com> wrote in message
news:ci********************************@4ax.com...
Is it possible to export a report to an excel spreadsheet using code.
Thanks for any help.