Skip to main content
Question

Excel formatting/styling with Dynamic Schema Definition

  • January 22, 2019
  • 4 replies
  • 114 views

ebygomm
Influencer
Forum|alt.badge.img+46

Is it possible to set a style for an excel cell if setting attributes dynamically?

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.

4 replies

ebygomm
Influencer
Forum|alt.badge.img+46
  • Author
  • Influencer
  • January 23, 2019

It seems like it should be possible but I'm not having much luck


Forum|alt.badge.img+2
  • January 23, 2019

@egomm you can set the style for a specific cell using the ExcelStyler or using the attribute xlsx_row_formatting. See the Excel documentation on Formatting. If you could include a small example of what you're trying to accomplish then someone might be able to give you more ideas, or we could make improvements to FME if needed.


ebygomm
Influencer
Forum|alt.badge.img+46
  • Author
  • Influencer
  • January 23, 2019

My writer currently looks like this.

The schema source is "Schema From Schema Feature" which is being generated within the workspace as the attributes to write out are generated from the data within the workflow. Adding the attributes into the schema, e.g. colA.formatting doesn't appear to work. I can't set them as attributes in the writer as they need to be dynamic, i.e. if colC exists i want to format it but sometimes col C doesn't exist.

I have a workaround, which uses multiple template files and named ranges, but it's not very elegant.


ranga_tolapi
Contributor
Forum|alt.badge.img+9
  • Contributor
  • November 3, 2023

Seems like this behavior/issue is there still with FME 2022.x.