Skip to main content
Question

Style Excel cell header / not cell values

  • May 4, 2018
  • 6 replies
  • 429 views

Hi all!

I am trying to style the headers of my excel list, based on their name.

With the Excel Styler I figured out how to style several values, using conditional values.

However, what I want is to style headers, not values. How can I define header of column to style? Is it possible?

Thanks in advance!

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

fmelizard
Safer
Forum|alt.badge.img+20
  • Safer
  • 3719 replies
  • May 4, 2018

Hi @balcpnar, one way is to use an Excel template to style the headers.


dbaldacchino1
Enthusiast
Forum|alt.badge.img+14
  • Enthusiast
  • 136 replies
  • August 26, 2020

A template is not an option if you want to write multiple times to the same file. You can only use this if you set the parameters in your writer to overwrite the file. Booo :(


jwarren
Contributor
Forum|alt.badge.img+5
  • Contributor
  • 16 replies
  • February 16, 2021

The only way I've found to get around this is to write with a featureWriter and then add an attributeCreator to add the field names as attributes for the summery, style them and then write again. Basically you're treating the field names as another dataset. It a proper fudge but I don't see any other way of doing it.


Forum|alt.badge.img
  • 4 replies
  • June 25, 2021

The only way I've found to get around this is to write with a featureWriter and then add an attributeCreator to add the field names as attributes for the summery, style them and then write again. Basically you're treating the field names as another dataset. It a proper fudge but I don't see any other way of doing it.

Hello

Thanks for your help !

Can you, please, explain in more detail ?


jwarren
Contributor
Forum|alt.badge.img+5
  • Contributor
  • 16 replies
  • June 25, 2021

Hello

Thanks for your help !

Can you, please, explain in more detail ?

Here is demo. It reads an excel file with 3 columns: Name, Age and Address. There is a formatter for the data and then a formatter for the headers.

 

As I've said in the annotations, I’m sure there must be a way of reading in the field name as attributes rather than hardcoding them in with an attribute creator but this did for my purposes. If I do come up with a way I will publish it has transformer so others can use it (I’ve had a quick go, but can’t find out a way to maintain the ordering of the columns).


Forum|alt.badge.img
  • 4 replies
  • June 28, 2021

Hello

Thanks for your help !

Can you, please, explain in more detail ?

Thank you !