Hi,
I kindly need to know how to transform a file in .csv format into a file in .pxy format or a .txt format.
Many thanks,
Mamdouh
Hi,
I kindly need to know how to transform a file in .csv format into a file in .pxy format or a .txt format.
Many thanks,
Mamdouh
If you simply want a basic A-to-B conversion from CSV to TXT the Generate Workspace option would probably be fine.
I'm not familiar with the .pxy format and can't seem to find it in FME's list of supported formats, can you tell us a bit more about it?
If you simply want a basic A-to-B conversion from CSV to TXT the Generate Workspace option would probably be fine.
I'm not familiar with the .pxy format and can't seem to find it in FME's list of supported formats, can you tell us a bit more about it?
Thanks. In fact I tried the Generate Workspace, but the generated text file I get is empty for some reason, so I wonder why.
The Pxy file is in principle a text file, usually imported from certain programs and include coordinates. But does not really matter if you can thankfully answer me about the txt format.
@mamdouh_90 Could you attach a small example of the source data and what you'd like to see in the destination data? CSV and TXT are both plain text ASCII datasets. The CSV reader splits the records into attributes. The txt writer writes a single attribute (text_line_data) as a record.
@mamdouh_90 Could you attach a small example of the source data and what you'd like to see in the destination data? CSV and TXT are both plain text ASCII datasets. The CSV reader splits the records into attributes. The txt writer writes a single attribute (text_line_data) as a record.
Hi,
The source data is, let's say a coodinate list in an excel sheet in csv format as seen in the attached image (1). The format I would like to get is text format as shown in attached image (2).
Image 1
Image 2
@mamdouh_90 Thanks for including the examples. FME doesn't have a Column Aligned Text writer. But you can probably combine the FME String functions @Format() & @PadLeft() to give you the formats you need. Then concatenate the resulting strings together and send those to the Text Line writer. A bit tedious, but doable if you don't have too many attributes.
The workspace would look something like this;
Workspace example (FME 2020): columnalignedtext.fmwt
@mamdouh_90 Thanks for including the examples. FME doesn't have a Column Aligned Text writer. But you can probably combine the FME String functions @Format() & @PadLeft() to give you the formats you need. Then concatenate the resulting strings together and send those to the Text Line writer. A bit tedious, but doable if you don't have too many attributes.
The workspace would look something like this;
Workspace example (FME 2020): columnalignedtext.fmwt
Many thanks for the answer. In fact I did not get how to select the format, what does %.6f stand for?
Many thanks for the answer. In fact I did not get how to select the format, what does %.6f stand for?
string format options are described here http://docs.safe.com/fme/2020.0/html/FME_Desktop_Documentation/FME_Transformers/Transformers/stringformatter.htm?Highlight=stringformatter or in more detail https://www.astro.princeton.edu/~rhl/Tcl-Tk_docs/tcl/format.n.html