Dynamic Datasource Path
- jim wood
- Site Admin
- Posts: 3951
- Joined: Wed May 14, 2008 1:51 pm
- OLAP Product: TM1
- Version: PA 2.0.7
- Excel Version: Office 365
- Location: 37 East 18th Street New York
- Contact:
Re: Dynamic Datasource Path
I've just gone through this. I can't remember where I was at the time but I do know I'm no hurry to go back. It's ironic that I'm now at a government agency and the security policies are no where near as tight inside the IT department.
Struggling through the quagmire of life to reach the other side of who knows where.
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
-
- Posts: 42
- Joined: Wed Jan 31, 2018 2:01 pm
- OLAP Product: MOLAP
- Version: 10.2
- Excel Version: 2013
Re: Dynamic Datasource Path
Hello Guys,
I have a problem to assign the file path in runtime.
I have made a ti process and select the type is File then assigned a template Excel file "Just contained a header" I attached it.
after that I opened the prolog tab : and wrote the following.
In the Data tab: I wrote the following as you see Just a simple code to check if it's okay or not.
If this doing well I will make a cube then put all my paths in it.
But, Unfortunately it doesn't work. Is there anything I missed ???
Thanks in advance,
Best Regrads.
I have a problem to assign the file path in runtime.
I have made a ti process and select the type is File then assigned a template Excel file "Just contained a header" I attached it.
after that I opened the prolog tab : and wrote the following.
Code: Select all
DataSourceNameForServer = 'C:\Program Files\ibm\cognos\tm1_64\samples\tm1\Test\Templates\ProductionData.xlsx';
Code: Select all
Version = 'Plan';
IF(Accounts @<> 'Accounts' );
IF(DimIx('ProductionDim', Accounts) > 0);
CellPutN(Year1/12, 'Production','Jan 2018' , Accounts, Version);
ENDIF;
ENDIF;
If this doing well I will make a cube then put all my paths in it.
But, Unfortunately it doesn't work. Is there anything I missed ???
Thanks in advance,
Best Regrads.
- Attachments
-
- Template.JPG (15.31 KiB) Viewed 2658 times
-
- File I want to Load.JPG (62.15 KiB) Viewed 2662 times
-
- MVP
- Posts: 1815
- Joined: Mon Dec 05, 2011 11:51 am
- OLAP Product: Cognos TM1
- Version: PA2.0 and most of the old ones
- Excel Version: All of em
- Location: Manchester, United Kingdom
- Contact:
Re: Dynamic Datasource Path
TIs don’t accept xls or xlsx etc rules as a source, it needs a flat file to read (CSV, CMA, TXT etc.)
I believe performance modeller could accept excel files but I think that just had an additional program that converted it to a CSV first, you can do something similar yourself by having VBS executed in the prolog to convert the xlsx to a CSV and then set the CSV as your data source.
I believe performance modeller could accept excel files but I think that just had an additional program that converted it to a CSV first, you can do something similar yourself by having VBS executed in the prolog to convert the xlsx to a CSV and then set the CSV as your data source.
Declan Rodger
-
- Posts: 42
- Joined: Wed Jan 31, 2018 2:01 pm
- OLAP Product: MOLAP
- Version: 10.2
- Excel Version: 2013
Re: Dynamic Datasource Path1
Appreciated sir, You are right it worked.declanr wrote: ↑Thu Jul 19, 2018 10:00 am TIs don’t accept xls or xlsx etc rules as a source, it needs a flat file to read (CSV, CMA, TXT etc.)
I believe performance modeller could accept excel files but I think that just had an additional program that converted it to a CSV first, you can do something similar yourself by having VBS executed in the prolog to convert the xlsx to a CSV and then set the CSV as your data source.
Really this is amazing community, Because everyone helps the others.
Thanks a lot,
Best Regards.