how to check if an excel sheet is empty ?

One Star

how to check if an excel sheet is empty ?

Hello !
I have an excel file which contains several sheets and I need to create a new sheet in which I list the name of each sheet with a "OK" if the sheet is empty or "KO" if the sheet is not empty... Is it possible to do this with talend ?
tFileProperties doesn't let me manipulate sheets so I don't know how to see if my sheet is empty or not.
Thank you for your help ! Smiley Happy
One Star

Re: how to check if an excel sheet is empty ?

Hello,
You could use some tJava and loading the jxl.jar library test what u need.
See http://jexcelapi.sourceforge.net/ for info about the API.
One Star

Re: how to check if an excel sheet is empty ?

Thank you Morbo !
However I think I need a little more details to do that... Smiley Happy
One Star

Re: how to check if an excel sheet is empty ?

Hello ,
how do you do to load the jxl.jar library.
I have the jxl.jar but I don't know how to load it .
Thx
Highlighted
One Star

Re: how to check if an excel sheet is empty ?

Hi,
Use the "tLibraryLoad" component at the start of your job.
Best regards,
Nicolas
Seventeen Stars

Re: how to check if an excel sheet is empty ?

hi all,
or if you want to use it in our own routine , you have to right clic on it (routine) to "edit routine librairies" and add jar file !
++
One Star

Re: how to check if an excel sheet is empty ?

Hi Smiley Happy
And do you know if it's possible to export this jar (edit routine librairies) with a job export made with Command Line ? I tried and it's not made automatically... is it possible ? or not ? or just bugged ?

What’s New for Talend Spring ’19

Join us live for a sneak peek!

Sign up now

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads