Hi guys
Cognos: v 7
O/S : Windows 2000
Excel: 2000
I'm missing something really obvious here and it's doing my head in!
I used to use Cognos v6 and had a few scheduled daily reports that exported into Excel 97 and they worked a treat. Then after the company decided to get me a new PC with Win 2000 on it and also upgrade me to Cognos v7, I started to have a niggly problem.
I can create the Excel files using the macro below, but I can't actually read them myself using Excel 2000, an error pops up saying "filename.xls can not be accessed. The file may be read only, or you may be trying to access a read only location."
Normally I would worry, but the niggly bit is that the admin guy I have scheduled these reports for can read these files on his NT4, Excel 97 machine.
My question is, can I specify which version of Excel to export to? Or is that the wrong question to ask?
Thanks in advance,
MooSki
MacroCode:
dim objImpApp as object
dim objImpRep as object
dim strRepDate as string
dim strRepname as string
sub Main()
strrepdate=format(date,"ddmmyy"
strrepname="[pathname]\u k\uk_" & strrepdate & "_adm.xls"
set objimpapp = createobject("CognosImpromptu.Application"
objimpapp.opencatalog "[pathname]\bi_prod\impromptu\catalogues\[catname].cat","[username]","[password]"
set objimprep = objimpapp.openreport("[pathname]\u k\rptFulfillment_UK_adm.imr"
objimprep.retrieveall
objimprep.exportexcel(strrepname)
objimprep.closereport
objimpapp.quit
set objimprep = nothing
set objimpapp = nothing
end sub
Cognos: v 7
O/S : Windows 2000
Excel: 2000
I'm missing something really obvious here and it's doing my head in!
I used to use Cognos v6 and had a few scheduled daily reports that exported into Excel 97 and they worked a treat. Then after the company decided to get me a new PC with Win 2000 on it and also upgrade me to Cognos v7, I started to have a niggly problem.
I can create the Excel files using the macro below, but I can't actually read them myself using Excel 2000, an error pops up saying "filename.xls can not be accessed. The file may be read only, or you may be trying to access a read only location."
Normally I would worry, but the niggly bit is that the admin guy I have scheduled these reports for can read these files on his NT4, Excel 97 machine.
My question is, can I specify which version of Excel to export to? Or is that the wrong question to ask?
Thanks in advance,
MooSki
MacroCode:
dim objImpApp as object
dim objImpRep as object
dim strRepDate as string
dim strRepname as string
sub Main()
strrepdate=format(date,"ddmmyy"
strrepname="[pathname]\u k\uk_" & strrepdate & "_adm.xls"
set objimpapp = createobject("CognosImpromptu.Application"
objimpapp.opencatalog "[pathname]\bi_prod\impromptu\catalogues\[catname].cat","[username]","[password]"
set objimprep = objimpapp.openreport("[pathname]\u k\rptFulfillment_UK_adm.imr"
objimprep.retrieveall
objimprep.exportexcel(strrepname)
objimprep.closereport
objimpapp.quit
set objimprep = nothing
set objimpapp = nothing
end sub