[resolved] Keep the format 'Percentage 2 decimal' in Excel file tFileOutputExcel

One Star

[resolved] Keep the format 'Percentage 2 decimal' in Excel file tFileOutputExcel

     Hello,
     I feed an Excel file (.xlsx) by tFileOutputExcel.
     This file contains a format 'Percentage with 2 decimal' on a column.
     At the exit of my tMap, the format is a 'Double'.
     The value written in the Excel file is correct, but the format is not preserved. It becomes 'Standard' and so my Double is not formatted as a percentage, but as a decimal with 14 decimal places.
     Do you have an idea to keep the column format?
     (Otherwise, I will format my value to a String with the desired format).
     thank you,
     Nicolas

Accepted Solutions
Seventeen Stars

Re: [resolved] Keep the format 'Percentage 2 decimal' in Excel file tFileOutputExcel

The build-in component cannot handle formats. The only way for you is writing it as text or you use the custom component tFileExcelSheetOutput which allows to set formats to the cells.
https://www.talendforge.org/exchange/index.php?eid=1257&product=tos&action=view&nav=1,1,1
The format you have to set can get seen in excel directly. The component use the same syntax.

All Replies
Seventeen Stars

Re: [resolved] Keep the format 'Percentage 2 decimal' in Excel file tFileOutputExcel

The build-in component cannot handle formats. The only way for you is writing it as text or you use the custom component tFileExcelSheetOutput which allows to set formats to the cells.
https://www.talendforge.org/exchange/index.php?eid=1257&product=tos&action=view&nav=1,1,1
The format you have to set can get seen in excel directly. The component use the same syntax.
One Star

Re: [resolved] Keep the format 'Percentage 2 decimal' in Excel file tFileOutputExcel

Thanks for your reply.
I try your component.
One Star

Re: [resolved] Keep the format 'Percentage 2 decimal' in Excel file tFileOutputExcel

Thank a lot.
The component allows me to offer new service to my users.
Nicolas
Seventeen Stars

Re: [resolved] Keep the format 'Percentage 2 decimal' in Excel file tFileOutputExcel

One Star

Re: [resolved] Keep the format 'Percentage 2 decimal' in Excel file tFileOutputExcel

The rating has been validated :
Great By NicolasTT on March 13, 2015
Thank you,
the component is very useful
Seventeen Stars

Re: [resolved] Keep the format 'Percentage 2 decimal' in Excel file tFileOutputExcel

OK OK I got it. I am happy to help you ;-)