Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

How to delete empty rows ?

How can I delete all empty rows after the last rows  from excel if they do not contain any data in order to reduce the size of the file via QlikView Script?

Any suggestions will be highly appreciated?

Tags (1)
1 Solution

Accepted Solutions

Re: How to delete empty rows ?

Hi,

As I Say QlikView will not load empty lines by default, provided there are some special characters available in excel.

To avoid that we use where len(Trim(Customer)>0);

Regards

ASHFAQ

7 Replies

Re: How to delete empty rows ?

Can you provide sample data to demonstrate issue and the required o/p.

Regards

ASHFAQ

nagaiank
Valued Contributor III

Re: How to delete empty rows ?

Do you want to know how to delete empty rows in Excel?

If your question is about deleting after load, you may try the following.

If your data has a key field which cannot be null or empty, you may filter the rows using the preceding load

LOAD * where Len(Trim([your key field])) > 0;

LOAD ..... From (Your Excel file);

Not applicable

Re: How to delete empty rows ?

I need to delete all rows after the last rows which contain no data and they are completely empty.

Not applicable

Re: How to delete empty rows ?

Hi NagaianK,

What do u mean by key field here - Len(Trim([your key field])) ?

Re: Re: How to delete empty rows ?

Hi,

By default Qlik Will not load empty lines, unless you have some null values.

Try with below code.

LOAD Customer,

    [Sales Order ID],

    ShipDate,

    Product,

    Sales,

    Quantity

FROM

(biff, embedded labels, table is [Sales Orders$])

where len(Trim(Customer)>0);

Let me know if that worked..

Regards

ASHFAQ

Not applicable

Re: How to delete empty rows ?

where len(Trim(Customer)>0);

Can you please me the above script and why do we use this ?

On Sun, Sep 28, 2014 at 2:46 PM, Ashfaq Mohammed <qcwebmaster@qlikview.com>

Re: How to delete empty rows ?

Hi,

As I Say QlikView will not load empty lines by default, provided there are some special characters available in excel.

To avoid that we use where len(Trim(Customer)>0);

Regards

ASHFAQ

Community Browser