Empty rows in text file

Post Reply
Dimix
Posts: 32
Joined: Fri Jan 15, 2016 2:53 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

Empty rows in text file

Post by Dimix »

I have a TI process that reads a text file (in this case a .rux file), and I'm using the following settings:
Capture.PNG
Capture.PNG (7.66 KiB) Viewed 3552 times
The preview indicates that there are empty rows in the text file:
Capture2.PNG
Capture2.PNG (8.14 KiB) Viewed 3552 times
However, empty rows seems to be ignored when processing the file in the MetaData/Data tab. This is problably by design, and for good reasons, ...but...is it possible to set up the TI process so that empty rows are included and read? Don't ask me why I want to do this. :D
Wim Gielis
MVP
Posts: 3103
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Empty rows in text file

Post by Wim Gielis »

That’s by design and known.

What you can do is use the Prolog tab to ExecuteCommand a script to replace the empty lines with something. Then you are ready on time to read in the file tin the following tabs of the process.
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Dimix
Posts: 32
Joined: Fri Jan 15, 2016 2:53 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

Re: Empty rows in text file

Post by Dimix »

Thanks Wim, good idea.
Wim Gielis
MVP
Posts: 3103
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Empty rows in text file

Post by Wim Gielis »

Have script produce its output in a different file than the .RUX file, to avoid problems in that file.
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
Dimix
Posts: 32
Joined: Fri Jan 15, 2016 2:53 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2013

Re: Empty rows in text file

Post by Dimix »

Maybe not the most efficient way to do it, but this is the syntax I use. It inserts a '#' for each empty row in the source file, and stores the end result in a new text file.

@(For /F "Tokens=1*Delims=:" %%A In ('FindStr/N "^" %1 '
) Do @If "%%B"=="" (Echo #) Else Echo %%B)>%2
Post Reply