How to check for the blank lines in an excel file.

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
anshumangupta1206
Participant
Posts: 42
Joined: Tue Jan 24, 2006 9:11 am

How to check for the blank lines in an excel file.

Post by anshumangupta1206 »

Hi,
I am processing an excel file through DataStage. The file format is like it has blank line after each row. I want that if there is any blank line I can reject that record otherwise process it. Could anybody tell me how i shd check this.
wed
Sunshine2323
Charter Member
Charter Member
Posts: 130
Joined: Mon Sep 06, 2004 3:05 am
Location: Dubai,UAE

Post by Sunshine2323 »

Hi Anshuman,

Since you are working on the Unix Server you might be converting the excel files to csv.

While reading the files using the sequential stage you can give the set the Incomplete Column property to Discard and Warn.
This will lead to all the blank lines being eliminated.
Also when you run the job you will get warnings in the director.

Other way is using the transformer you can concatinating the columns and checking the len to be greater then 0 or checking that they are not equal to blank('')

This can be achieved in many possible ways.

Hope this helps :)
Warm Regards,
Amruta Bandekar

<b>If A equals success, then the formula is: A = X + Y + Z, X is work. Y is play. Z is keep your mouth shut. </b>
--Albert Einstein
anshumangupta1206
Participant
Posts: 42
Joined: Tue Jan 24, 2006 9:11 am

Post by anshumangupta1206 »

Thanks buddy!!
It is working.
wed
Post Reply