Hello everyone, I am extremely new to FME and I am trying to do a basic task and take a column in excel and turn it into an inline csv document. Any help would be appreciated, even links to know forum answers I can't find yet.
Best answer by jovitaatsafe
Ok I have gotten some progress, thank you both. I am going to attach an image of the work flow and also the csv file. I want to have the numbers in a single comma separated line for an end user and I am stumped right now.
Hi @tim_t, glad to see that you've made some progress! While FME allows for many different ways of doing things (no single correct method), I think it'll be a bit easier to use the AttributeTransposer for this one. Here's what the workflow could like:
- Read in excel data, make sure you check the starting value or row that FME reads so you don't lose the first serial number value as an attribute name (ex. data starts on row 1 so 'Field Names Row' is 0).
- Use an AttributeTransposer to transpose the column of values into a single row of attributes. Check the Feature Information Window at this step (the icon with a note and a yellow information icon on the visual preview) to see that the attributes are there but just not exposed yet
- Expose attributes so they are visible in the table. Quick tip: Run the transformation to (and including) the AttributteTransposer so you can hit Import > Import From Feature Caches and select all in your AttributeExposer
- Remove the original colA value to keep from writing it
- Write to CSV ensuring the 'Write Field Names Row' is set to No, otherwise it will write out two sets serial numbers: the field name and the value
Below is a screenshot that shows the described workflow. I only used a small subset of the serial number data to show it. Output is a CSV that is one line separated by commas.
I think the tricky part is the AttributeTransposer. It looks like nothing has happened immediately in the output, but the information window should look something like this:
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.