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

Open Excel from Impromptu

Status
Not open for further replies.

brepauls

Technical User
Sep 30, 2004
6
US
Previous posts have been extremely helpful on how to open and format data in excel file from Impromptu script editor!!

I need your expertise to determine appropriate scripting to do a "find" for a value and/or insert a footer into the file. Any help is greatly appreciated!!

Thank you in advance for your assistance,
Brenda P.
 
Brenda,
since nearly all excel commands can be scripted, it's more a question of posting the macro that you create in Excel or Visual Basic and then adding it to the Cognos Script with slight adjustment to suit.

To check the whole worksheet, one way would be to get a column and row count of the sheet (eg NoColumns = objExcel.Sheets("sheet1").UsedRange.Rows("2").Cells.Count where "sheet1" is the worksheet name and Row 2 contains the maximum columns - I found that the value xlLastCell never worked for me), then perhaps perform a test of every cell by looping for the column and row count and then use a command like objExcel.ActiveSheet.PageSetup.CenterFooter = <string version of value that you want> if the value is found.

soi la, soi carré
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top