One Star

[resolved] Spaces in the column headers of Excel output file

Is it possible to generate an Excel output file that contains column header names that have spaces in them? (Since normally when you create a schema the column names cannot include spaces.)
4 REPLIES
Moderator

Re: [resolved] Spaces in the column headers of Excel output file

Hi,
You can set your header names with space as "Column" instead of "Schema".
To make it clear, I have designed a demo job for you.
Please have a look at my screenshots
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
One Star

Re: [resolved] Spaces in the column headers of Excel output file

Thanks! So how would I set this up if the data is coming in from a table rather than a Fixed Flow Input? (i.e. since I cannot include the column names from the table as input data)
Seventeen Stars

Re: [resolved] Spaces in the column headers of Excel output file

What Sabrina suggest is to write as first the header as normal output flow with in row and after that with a join write the actual data with another output flow. It is a bit cumbersome but the only way if you restricted on the build-in components.
If you can use user components like tFileExcelSheetOutput you can define the header names as you want without any limits.
http://www.talendforge.org/exchange/index.php?eid=624&product=tos&action=view&nav=1,1,1
Take a look in the documentation linked in the component detail page.
Moderator

Re: [resolved] Spaces in the column headers of Excel output file

Hi,
Dynamic schema feature allows you to design schema with an unknown column structure (unknown name and number of columns). TalendHelpCenter:How to process changing data structure?
So far, the dynamic schema is not supported by the tFileOutputExcel component. You have to design a fixed schema without space in schema setting of tFileOutputExcel.
Currently, only the databases input and output, the tFileInputDelimited and the tFileOutputDelimited are supported.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.