ASCIIOUTPUT to include column headers?

Post Reply
jimicron
Posts: 110
Joined: Tue Oct 30, 2012 5:21 pm
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2007 SP2 MSO
Location: Boise, ID

ASCIIOUTPUT to include column headers?

Post by jimicron »

Hi all,

I am trying to export my TM1 cube (simple attributes cube) but it is not including column headers :( I have been looking around in here and found a post that I thought would be helpful since it resolved the other members same issue. Here is that post:

http://www.tm1forum.com/viewtopic.php?f=3&t=3245

However, I have done the same and it's not working :(

Here is exactly what I have done:

Prolog Tab:

Code: Select all

Header = 1;
Data Tab:
(please note I use a full UNC path and not "file path" - I have stated that there for simplicity instead of a lengthy filepath)

Code: Select all

IF (Header = 1);

ASCIIOUTPUT('\\file path\SSD MPN Export.csv', vSSDMPN, vInclusionFlag, vSSDModel, vTotalGBperSSD, vModuleFormFactorPrefix, vModuleFormFactor, vDID, vDensityperIndividualNANDGb, vTotalGigabitsperSSD, vTotalNANDDie, vSeries, vSSDModelandDID, vUsableGBperSSD, vMemoryComponentQuantity, vProductSubtechnology, vNANDInterface, vUsageType );

Header = Header - 1;
ENDIF;
The process runs without error, but when it's done and I look at the .csv, there are no headers :(
And, there is only one line of data :( The cube has about 400 lines in it so I need those 400 lines.

Here is what it looks like:

Thanks again for guidance!!
Attachments
TM1 Export Example with no headers and limited data.jpg
TM1 Export Example with no headers and limited data.jpg (47.57 KiB) Viewed 4011 times
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: ASCIIOUTPUT to include column headers?

Post by tomok »

Where are the code statements that are supposedly going to write out the header? The only ASCIIOUTPUT statement I see looks like it is using variable values to output. To write out headers you would need a separate ASCIIOUTPUT statement inside the IF condition.

Code: Select all

IF (Header = 1);
    ASCIIOUTOUT('\\file path\SSD MPN Export.csv','Header1','Header2','Header3'............
ENDIF;
ASCIIOUTPUT('\\file path\SSD MPN Export.csv', vSSDMPN, vInclusionFlag, vSSDModel, vTotalGBperSSD, vModuleFormFactorPrefix, vModuleFormFactor, vDID, vDensityperIndividualNANDGb, vTotalGigabitsperSSD, vTotalNANDDie, vSeries, vSSDModelandDID, vUsableGBperSSD, vMemoryComponentQuantity, vProductSubtechnology, vNANDInterface, vUsageType );
Header = Header - 1;
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
jimicron
Posts: 110
Joined: Tue Oct 30, 2012 5:21 pm
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2007 SP2 MSO
Location: Boise, ID

Re: ASCIIOUTPUT to include column headers?

Post by jimicron »

:oops: Thanks!! Didn't know that. That other thread didn't mention that. So, have added per how you stated putting the column header names in single quotes and voila - worked perfectly!

Thanks a lot for your help! Appreciate it!
Post Reply