Skip to main content
Question

Format XLS to repeat stacked records


Forum|alt.badge.img

Anyone have any ideas on how to format XLS to repeat stacked records in groups of four (see attached screenshot). Each group of four is one record in a database, but want to format it with the name and address on top of each other. And the parcel number/zoning. All of the header info will be part of the template.

 

Is this possible, or will we just have to write it out linear, then do some excel magic afterward to get it into the format we want? Thanks.

2 replies

danminneyatsaf
Safer
Forum|alt.badge.img+12

@candimk​ for specific styling such as this, you can use the Text Control parameter in the Writer Feature Type and set it to Wrap Text. You can find this parameter by opening the Excel Writer Feature Type, setting Attribute Definition to Manual, and clicking Edit...

image 

I tested this in a very simplified workspace and was able to get what you're asking for working.

imageYou will need to make sure that your attribute is formatted with breaklines present. This way, FME will know how to wrap the attribute when writing it out to the Excel sheet. This screenshot is what I used.

image 

If the data you're bringing in is in a set of different attributes (i.e. name, address, city, country all as separate attributes). You could use a StringConcatenator to group the attributes together into one attribute, setup like so:

imageI attached my simple workspace to this comment as an example.

 

Hope this helps answer your question!


Forum|alt.badge.img
  • Author
  • May 31, 2022

Thanks, this is what I ended up figuring out. I was hoping to be able to have each on their own line, but my end user said they could work with the wrapped text. So not too concerned. Thanks for the xls formatting tip. I had it set up as wrap text in the template, but it didn't seem to work.


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