Page 1 of 1

Export Cube ViewTo Excel/CSV

Posted: Mon Sep 27, 2010 5:24 pm
by vinnusea
What script i need to write to export the cube view to Excel or CSV and this process should be added in chores. And where to write??.....
Thanks for your time.

Re: Export Cube ViewTo Excel/CSV

Posted: Mon Sep 27, 2010 6:02 pm
by rkaif
You can use ASCIIOutput() function to export data to CSV file

Crate a TI Process
Data Source tab: Use the Cube View as the Data Source
Variable tab: declare all the variables as Other
Advanced -> Data tab: use ASCIIOutput function to export the data to CSV file

Hope that helps!

Re: Export Cube ViewTo Excel/CSV

Posted: Mon Sep 27, 2010 6:05 pm
by vinnusea
Thank you soo much.... for the reply

Re: Export Cube ViewTo Excel/CSV

Posted: Mon Sep 27, 2010 7:24 pm
by vinnusea
ASCIIOUTPUT('C:\Documents and Settings\preeth\Desktop\TEST11.cma', v1, v2, v3, v4, v5, v6 );

I took TM1 Cube view as source and all variables to Other and gone to Data taba and wrote above code and its throwing me error
"

syntax error on or before :
v6 );
invaled string expression
"

Can you help me ...plz

Re: Export Cube ViewTo Excel/CSV

Posted: Mon Sep 27, 2010 7:36 pm
by tomok
ASCIIOutPut command can only output text, You'll have to convert v6 to text before you can use it in the formula.

Re: Export Cube ViewTo Excel/CSV

Posted: Mon Sep 27, 2010 7:49 pm
by vinnusea
Yes its working.. Thanks alot.. sir.

Re: Export Cube ViewTo Excel/CSV

Posted: Thu May 10, 2018 8:59 am
by aryan
tomok wrote: Mon Sep 27, 2010 7:36 pm ASCIIOutPut command can only output text, You'll have to convert v6 to text before you can use it in the formula.
When I am Converting Number to string Only one value is converting and i am getting only one value in the output how to change total data to string

Re: Export Cube ViewTo Excel/CSV

Posted: Thu May 10, 2018 11:46 am
by tomok
aryan wrote: Thu May 10, 2018 8:59 am
tomok wrote: Mon Sep 27, 2010 7:36 pm ASCIIOutPut command can only output text, You'll have to convert v6 to text before you can use it in the formula.
When I am Converting Number to string Only one value is converting and i am getting only one value in the output how to change total data to string
Read the request for assistance guidelines first and then come back with the kind of information you need to be providing. I have no clue what you are talking about.

Re: Export Cube ViewTo Excel/CSV

Posted: Thu May 10, 2018 8:56 pm
by Steve Rowe
Hmmm, you need to convert each field/column/variable to a string independently, so if you have 5 numeric variables then you'll need to write.

AsciiOutput( 'WhyIsThisFunctionNameSoLong.cma' , NumberToString( v1) , NumberToString( v2) , NumberToString( v3) , NumberToString( v4) , NumberToString( v5) );

If that doesn't answer your question then I'm not sure what you are after either..