Skip to main content
Solved

MS Word Styler - how to create vertical transposed table


ekkischeffler
Contributor
Forum|alt.badge.img+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?

Best answer by hollyatsafe

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.

View original
Did this help you find an answer to your question?

4 replies

Forum|alt.badge.img+2
  • Best Answer
  • August 3, 2018

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.


ekkischeffler
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • August 3, 2018
hollyatsafe wrote:

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?


Forum|alt.badge.img+2
hollyatsafe wrote:

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!

ekkischeffler
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • August 4, 2018
hollyatsafe wrote:

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


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