COGNOiSe.com - The IBM Cognos Community

ETL, App Development and other tools => COGNOS DecisionStream/Data Manager => Topic started by: terry_stjean on 18 Jun 2013 09:51:17 AM

Title: Write to Excel
Post by: terry_stjean on 18 Jun 2013 09:51:17 AM
I'm using Data Manager 10.2. I know how to reade from an Excel file but how do I write to an Excel file?
I came across an IBM document which said to create an ODBC connection to the Excel file.
But how do I specify to use the ODBC connection on the Fact Delivery tab?
Title: Re: Write to Excel
Post by: terry_stjean on 18 Jun 2013 11:47:56 AM
Okay, I figured it out.
The only issue I have now is that you cannot delete data from the Excel file. It looks like you can only append.
Any suggestions?
Title: Re: Write to Excel
Post by: MFGF on 19 Jun 2013 04:40:40 PM
You could perhaps call a system() function in a variable initialisation at the start of the build which removes the .xls file when the build starts? Or do you want to selectively delete rows?

MF

Title: Re: Write to Excel
Post by: terry_stjean on 19 Jun 2013 05:58:37 PM
Actually what I ended up doing was to created a blank Excel file called template.xls.
Then at the start of the routine , I copy the template.xls to the folder the ODBC points to and then populate that file.