I have a TI process that reads a text file (in this case a .rux file), and I'm using the following settings:
The preview indicates that there are empty rows in the text file:
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.
Empty rows in text file
-
- MVP
- Posts: 3113
- 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
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.
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
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
-
- 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
Thanks Wim, good idea.
-
- MVP
- Posts: 3113
- 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
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
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
-
- 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
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
@(For /F "Tokens=1*Delims=:" %%A In ('FindStr/N "^" %1 '
) Do @If "%%B"=="" (Echo #) Else Echo %%B)>%2