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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Excel Worksheets

Status
Not open for further replies.

tommyfs

Programmer
Jun 13, 2004
8
US
I have 2 related Impromptu reports which I want to save as 2 different worksheets in the same Excel workbook; i.e., just one file with sheets 1 and 2. Can it be done?
 
This can be done through VB and VBA, but I'm not sure how you would do it exactly in Cognos Script.

In theory you could do the following:

Declare Excel as an Application
Run and save both reports in separate excel files.
Launch Excel and open both workbooks.
Copy the sheet from one of the workbooks into the other one.
Save and close Excel.

If you have VBA experience, the syntax should be pretty easy, if not, you're in for a longer haul but I think it could be done.

I am what I am based on the decisions I have made.

DoubleD [bigcheeks]
 
tommyfs,
Once again, MrDD is "on the money". I have a macro that, in one part, does exactly what he describes.
As an aside, if you create an impromptu report with a main and a sub report, then in Impromptu 7.3, save as Excel creates 2 worksheets in the same workbook. Can your two reports be merged into one?

soi la, soi carré
 
Ahh, that's what I was after. Already tired of the cut and paste method, although it works. But the report & sub-report idea bears a look-see. Yes, my 2 reports are same data, different view, lending themselves perfectly to this method. Many thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top