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!

Rquesting help - Saving 2 excel via scheduler

Status
Not open for further replies.

rosibee

Programmer
Jul 2, 2001
8
0
0
GB
Hi all

I am desperately seeking info about how to setup Scheduler to save an impromptu file as an excel file!

I am unable to get into the web site because I need a UID&Password! SO can anyone be of assistance!

Thanks in advance

rosi ;-)
 
This macro saves the active report as an Excel file. Create a macro in CognosScript Editor and schedule it to run in Scheduler. You may want to modify this macro to open a specified report instead of relying on the active report to be correct.

Sub Main()
Dim objImpApp As Object
Dim objImpRep As Object
Dim strExcelFileName As String
Set objImpApp = CreateObject("CognosImpromptu.Application")
Set objImpRep = objImpApp.ActiveDocument
strExcelFileName = Left$(objImpRep.FullName, Len _
(objImpRep.FullName) - 4)
objImpRep.ExportExcel strExcelFileName & ".xls"
Set objImpRep = Nothing
Set objImpApp = Nothing
End Sub

HTH,

Justin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top