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

Highlighted
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.

View solution in original post


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.

View solution in original post

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 ;-)

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog