11-15-2016 04:12 PM - edited 07-23-2021 12:04 PM
I know I can input .csvand other delimited text files - what about text (.txt) files?
Yes - you can input text (.txt) files! The approach described below applies to all delimited text files - and can also input other file types (like XML) as plain text.
Simply point your Input Data Tool to a file of your choice and specify the configuration options below:
The approach uses .csv as the File Format and the \0 (none) delimiter to keep from delimiting the file, inputting it as asingle body of text. Since the whole of the file is being input as one string field, you'll have to enter an adequate string length to capture all the file's contents (9999 in the above - you can use an Auto Field Tool to minimize this after inputting). This will usually mean keeping from using the first row of the file as field names, so pay mind to Option 6 (unchecked).
Once the file is input as a single block of text, the Text to Columns Tool can makeshort workof parsing it into a tabulated format!
The technique shown above can also help to workaround common input errors from delimited files.
Can you make this an Application where the characteristics Selected above apply to whatever TXT Input is selected?
I need the above comment answered for my application as well!
hello,
I have a similar problem working file,
I am having troubles
1. how to input this file in alteryx.
2. How to get contents line 2 in line with line 1.... every entry is in 2 parts, line 1 and line 2 should be placed against each other. similarly Line 3 and 4 should be against each other. I dont know how i can do that
example of text file (8 lines 😞
4010 VISA OUTGOING CC 000000 : ALT CUR CAD 2
GL 1520VSA02E800CACAD ALT 8118 C 999998 OFFSET: N PRIOR: N : ( 34,214,760.94)
4020 VISA INTERCHANGE INCOME DOMESTIC CC 000000 : ALT CUR CAD 3
GL 6355VSA00E901CACAD ALT OFFSET: N PRIOR: N : ( 4,207,893.30)
4025 VISA INTERCHANGE INCOME INTERNATIONAL CC 000000 : ALT CUR CAD 3
GL 6355VSA00E901CACAD ALT OFFSET: N PRIOR: N : ( 568,056.28)
4040 VISA INTERCHANGE EXPENSE DOMESTIC CC 000000 : ALT CUR CAD 4
GL 6356VSA00E901CACAD ALT OFFSET: N PRIOR: N : 125,144.08
@PreetiVatnani how about this?
hi NeilR
Thank you so much for the help. This gives me a good idea of how i can do some workarounds,
Unfortunately, it doest work on my text file. May i share the file separately on a thread with you please?
@PreetiVatnani yes feel free
I need help again with my text file. This file has records of data but in beginning of every page it has some basic account information added which i need to remove. I want this account information to be extracted as a column and not after each page. also, end of my file has a conclusion statement, closing value, sum etc. Not sure how to remove them as this data will not always appear on line number X. It depends on number of transactions where the concluding line will be.
please help NeilR
@PreetiVatnani please start a new Designer discussion (here) so that you can attach the file.
NeilR there seems to be some issue, whenever i try to start a new discussion and attach a file i get following error. there is no issue with my file size or type, yet i get this error.
" The maximum number of attachments has been reached. Maximum number of attachments allowed is: {0} "
@PreetiVatnani i'm seeing that too, but if you just click the browse link and upload the file it works anyway.
Hi,
@MattD I have 20 txt files that I need to input. Is there a way to define your solution in 1 time or do I need to go file by file?