Skip to main content
Solved

XLS writer: set specific cell value


Forum|alt.badge.img

Hi,

I'm creating a transformer and getting an XLS output starting to write on row 2. I've successfully set a template for the header and format, however I need to write specific data such as date or file description in the top row.

 

How can I write the Document title on cell A1, Author on cell B1, DDMMYY on cell C1?

Best answer by takashi

Hi @heboma, you can control cell positions to write specific values through using some Excel writer feature type parameters.

  • Output Field Names: Set "No" not to write field names.
  • Use Attribute Names As Column Positions: Set "Yes" so that attribute names (A, B, C, ...) determine the column positions.
  • Row Number Attribute: Set an attribute that stores "1", in order to the values will be written into the first row.

See also this screenshot.

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

4 replies

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • August 8, 2017
Hi @heboma, have you tried defining the attribute names with an AttributeCreator or AttributeManager? Do these attribute names need to be created dynamically?

danilo_fme
Evangelist
Forum|alt.badge.img+42
  • Evangelist
  • August 9, 2017

Hello @heboma, on the last year i created a Workspace that has your goal.

By the way has a interessant Webinar about format xls format Webinar Excel.

fluxo-gravar-celula.fmwt

Please, see attached.

Thanks,

Danilo


takashi
Supporter
  • Best Answer
  • August 9, 2017

Hi @heboma, you can control cell positions to write specific values through using some Excel writer feature type parameters.

  • Output Field Names: Set "No" not to write field names.
  • Use Attribute Names As Column Positions: Set "Yes" so that attribute names (A, B, C, ...) determine the column positions.
  • Row Number Attribute: Set an attribute that stores "1", in order to the values will be written into the first row.

See also this screenshot.


Forum|alt.badge.img
danilo_fme wrote:

Hello @heboma, on the last year i created a Workspace that has your goal.

By the way has a interessant Webinar about format xls format Webinar Excel.

fluxo-gravar-celula.fmwt

Please, see attached.

Thanks,

Danilo

thanks @takashi @danilo_inovacao Great idea! Looks good, I just need to be able to insert the value above my data table as it is part of the header and not the data.

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