Skip to main content
Question

Convert a .txt to excel and strip out some columns


Forum|alt.badge.img

I am complete novice to FME.

I have a .txt file which I wish to convert to excel. But I only want some of the information to be brought into the excel spreadsheet. I'm not sure how to begin.

All I want in the excel spreadsheet (bottom image) is the name e.g HP40 but without the .tif extension and the date e.g 04/03/2016 without the time.

I am not sure what connectors to use or how to strip out the unwanted info from the .txt file.

2 replies

jdh
Contributor
Forum|alt.badge.img+28
  • Contributor
  • July 8, 2020

You can read in the text file as a CSV or CAT depending on whether the columns are separated by tabs/spaces or are a specific width.

 

 

The FilenamePartExtractor will give you the root filename, and the DateTimeFormatter can give you the date, though it may be simpler to just use an attribute splitter.

Forum|alt.badge.img+2

@mitburger SubstrngExtractor will let you extract the file name. Or StringSearcher if you're comfortable with regular expressions


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings