企业绩效管理网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 244|回复: 3

AsciiOutput: Alternatives via TI

[复制链接]

72

主题

369

帖子

527

积分

高级会员

Rank: 4

积分
527
QQ
发表于 2014-3-16 05:57:01 | 显示全部楼层 |阅读模式
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
回复

使用道具 举报

76

主题

356

帖子

534

积分

高级会员

Rank: 4

积分
534
QQ
发表于 2014-3-16 07:14:10 | 显示全部楼层
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

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:

Code: DatasourceASCIIQuoteCharacter='';

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.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

75

主题

398

帖子

573

积分

高级会员

Rank: 4

积分
573
QQ
发表于 2014-3-16 07:47:01 | 显示全部楼层
Alan 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:

Code: DatasourceASCIIQuoteCharacter='';

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.

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 story   

I thought there was something i was missing. That's it! Thanks heaps for that! Exactly what i was after.


Paul

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

85

主题

408

帖子

596

积分

高级会员

Rank: 4

积分
596
QQ
发表于 2014-3-16 09:15:23 | 显示全部楼层
vaneagle wrote:[quote]Alan 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:

Code: DatasourceASCIIQuoteCharacter='';

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.

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 story   
[/quote]

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:I thought there was something i was missing. That's it! Thanks heaps for that! Exactly what i was after.

You're welcome.

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|企业绩效管理网 ( 京ICP备14007298号   

GMT+8, 2020-10-31 00:19 , Processed in 0.154307 second(s), 12 queries , Memcache On.

Powered by Discuz! X3.1 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表