Hi One and All,
I am trying (well i can do it actually!) to extract data from a cube via a TI, but need to data to come out as values and not as strings.
Obvioulsy AsciiOutput extracts values as strings, so i was wondering if there are other options?
I have looked through the Reference files but with little luck.
Does anyone have any ideas?
I am running 9.5.1
AsciiOutput: Alternatives via TI
-
- Site Admin
- Posts: 6667
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: AsciiOutput: Alternatives via TI
A text file is, by definition, text. There aren't strings and "values", just text characters which any program which reads the file can interpret as values or strings for internal storage.vaneagle wrote:Hi One and All,
I am trying (well i can do it actually!) to extract data from a cube via a TI, but need to data to come out as values and not as strings.
Obvioulsy AsciiOutput extracts values as strings, so i was wondering if there are other options?
I have looked through the Reference files but with little luck.
Does anyone have any ideas?
I am running 9.5.1
I presume you mean that you don't want quote marks around the values that are output. In that case, you just set this in the Prolog:
Code: Select all
DatasourceASCIIQuoteCharacter='';
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- Posts: 30
- Joined: Mon Jun 15, 2009 6:13 am
- OLAP Product: Cognos Express and TM1
- Version: 9.4 to 10.2
- Excel Version: Excel 02 to 10
- Location: Sydney
Re: AsciiOutput: Alternatives via TI
Yes, i opened the file via excel and hence no quote marks so i thought all was good with the world!. But opening in notepad shows a different storyAlan Kirk wrote: A text file is, by definition, text. There aren't strings and "values", just text characters which any program which reads the file can interpret as values or strings for internal storage.
I presume you mean that you don't want quote marks around the values that are output. In that case, you just set this in the Prolog:
That is, set the quote character to an empty string. Note that that will remove all quote marks around the output fields, so if you still need them for text output fields you need to add them to that output explicitly.Code: Select all
DatasourceASCIIQuoteCharacter='';

I thought there was something i was missing. That's it! Thanks heaps for that! Exactly what i was after.
Paul
-
- Site Admin
- Posts: 6667
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: AsciiOutput: Alternatives via TI
Yup, Excel "helps" you by converting any values in a text or .csv file into what it thinks is the right format; essentially what I was saying about the program that opens the file interpreting "as values or strings for internal storage". When Excel sees something that is entirely numeric but for the presence of surrounding quote marks, it interprets it as a number and writes it into the cell accordingly. If the field has even the vaguest resemblance to a date, it'll change it into that. This is sometimes (often) a pain in the backside because it can result in dropped leading zeroes of account codes, for instance, or accounting combination codes being converted into scientific notation values. That's why if I need to load something into Excel I ensure that it has a .cma extension rather than a .csv one; .csvs it loads automatically by default, .cmas it doesn't know what to do with so it kicks off the text import wizard, giving you full control on a field by field basis. But even then if you ask for the field to be imported as a value, the surrounding quote marks will be stripped.vaneagle wrote:Yes, i opened the file via excel and hence no quote marks so i thought all was good with the world!. But opening in notepad shows a different storyAlan Kirk wrote: A text file is, by definition, text. There aren't strings and "values", just text characters which any program which reads the file can interpret as values or strings for internal storage.
I presume you mean that you don't want quote marks around the values that are output. In that case, you just set this in the Prolog:
That is, set the quote character to an empty string. Note that that will remove all quote marks around the output fields, so if you still need them for text output fields you need to add them to that output explicitly.Code: Select all
DatasourceASCIIQuoteCharacter='';
![]()
You're welcome.vaneagle wrote:I thought there was something i was missing. That's it! Thanks heaps for that! Exactly what i was after.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.