Solved

MS Word Styler - how to create vertical transposed table

  • 3 August 2018
  • 4 replies
  • 11 views

Badge +5

Is there a way to create a transposed table in the MSWordStyler? I'd like to have attribute names in column 1 vs. attribute values in column 2 like this:

So far I only managed to create a table like this:

The horizontal presentation isn't really useful for Word documents, especially when listing lots of attribute values.

I've tried creating several individual tables that I concatenate when writing but there will always be a line break between them. I've also had a look at the msword_table_col_header{0} and msword_table_col_value{0} format attributes but it looks like they don't allow for more than one row either.

Is there a solution?

icon

Best answer by hollyatsafe 3 August 2018, 22:05

View original

4 replies

Badge +2

Hi @ekkischeffler,

There is no setting to do this in the MS Word Styler but you can do this using the AttributeExploder which will create an Attribute Name and Attribute Value column, the names of which (Headers) can be set within the parameter editor. Then use an MSWordStyler after this.

Badge +5

Hi @ekkischeffler,

There is no setting to do this in the MS Word Styler but you can do this using the AttributeExploder which will create an Attribute Name and Attribute Value column, the names of which (Headers) can be set within the parameter editor. Then use an MSWordStyler after this.

Hi @hollyatsafe, thanks for the answer. I'm not quite sure what your solution looks like - would you be able to provide a workspace?

I should probably clarify that transposing the data and getting the attribute names and values isn't the problem here. My issue is simply creating the table with the MSWordStyler so that the MSWord Writer gets the correctly formatted output. In the MSWordStyler it looks like you can always only create one header row and one value row while it is possible to add more columns - or have I missed something obvious?

Badge +2

Hi @ekkischeffler,

There is no setting to do this in the MS Word Styler but you can do this using the AttributeExploder which will create an Attribute Name and Attribute Value column, the names of which (Headers) can be set within the parameter editor. Then use an MSWordStyler after this.

Hi @ekkischeffler,

 

By using the AttributeExploder you can then define the values in the MSWordStyler using these attributes and this will create multiple features per heading. Please see the steps below to help with the explaination:

 

 

So you have an input:

 

Then an AttributeExploder (no need to change any settings here). Followed by your MSWordStyler. Type out the heading names (Attribute and Value) and then set the values to the new attributes we just created:

 

And this will write it out to word like so:

 

Hopefully that makes a little more sense now!
Badge +5

Hi @ekkischeffler,

There is no setting to do this in the MS Word Styler but you can do this using the AttributeExploder which will create an Attribute Name and Attribute Value column, the names of which (Headers) can be set within the parameter editor. Then use an MSWordStyler after this.

It does make sense now, thanks very much! I didn't realise the MSWordStyler had a built in Group By. That means separate tables are created in separate MSWordStylers and the output features must enter the writer in an ordered manner. Good to know!

Reply