Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Apply background color in tFileOutputExcel

hi,
I begin a new job, and i work now in some jobs talend.
I have a question : Is it possible to apply a background (color) in cell if some condition are true ?
I saw Tjava and TjavaRow component, and i saw we could use jxl.jar or anything else. But i really dont know java code, and i really dont know if i can do that.
Why ? my file excel need to apply some format when the job is over, and i apply manually some format. It very long, because my file is very heavy (more 100 000 lines)
So i would like to apply those formats automatically. 
I though to use Macro Excel, but it's not a good solution ...
Any idea...?
Labels (3)
11 Replies
Anonymous
Not applicable
Author

Hi sidewolf,
You requirement is not very clear for us. Do you want to mark your input/output data with background (color) by using Talend?
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi sidewolf,
You requirement is not very clear for us. Do you want to mark your input/output data with background (color) by using Talend?
Best regards
Sabrina

Finaly i was clear lol ... yes i would like to mark your input/output data with background (color) by using Talend. How ? By using Tjava or TjavaRow with jxl.jar library.

Why ? Because my outputfile (excel file) require some filters. For example. 
If Columns T Value = 1 then BackgroundColor columns B  = Yellow 

other example :

If Col_A.Value = NOK then delete lines

I think i could do a Macro VBA   , except that my Talend job is running everyday and my file is overwrite everyday, so that solution is not possible.

So i would like to know if it's possible by using a job component like Tjava or TjavaRow or anything else.

 
Anonymous
Not applicable
Author

The build-in excel components are not able to handle styles.
The only way to apply styles (like conditional formatting) is using the component suite tFileExcel*
You need 3 components:
tFileExcelWorkbookOpen to open an existing file (containing your styles and formats) or create an new empty workbook 
tFileExcelSheetOutput to create/write a sheet (fully documented, refer the resources to the component)
tFileExcelWorkbookSave to save the read or created workbook as new file.
Visit Talend Exchange and search for excel
Anonymous
Not applicable
Author

The build-in excel components are not able to handle styles.
The only way to apply styles (like conditional formatting) is using the component suite tFileExcel*
You need 3 components:
tFileExcelWorkbookOpen to open an existing file (containing your styles and formats) or create an new empty workbook 
tFileExcelSheetOutput to create/write a sheet (fully documented, refer the resources to the component)
tFileExcelWorkbookSave to save the read or created workbook as new file.
Visit Talend Exchange and search for excel

I guest thoses 3 components are not available in Talend Open Studio for DI ?
Anonymous
Not applicable
Author

They are not out-of-the-box in the studio but Talend Exchange is supposed to provide such extensions.
Follow these instructions:
https://help.talend.com/pages/viewpage.action?pageId=190513200
Anonymous
Not applicable
Author

They are not out-of-the-box in the studio but Talend Exchange is supposed to provide such extensions.
Follow these instructions:

Ok i downloaded those components, and i succeeded to deploy them in TOS. However, i don't know how to use them to do what i want. Meaning, to color some cells if some condition are true.
Anonymous
Not applicable
Author

Yes the component it self cannot set styles yet. But the usually used way is to define conditional styles. If you build a excel file which contains in the first row what you are going to (re)write it uses these styles and can also extend them in case the styles affect a range.
Anonymous
Not applicable
Author

Hi team,

 

The below given link is not working. I want to format the output excel as shown in screenshot

i.e header backgroud, header text bold, data text in skyblue color etc

 

Please let me know how to achive it

Anonymous
Not applicable
Author

PFA is the screenshot


Style.PNG