Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Contributor II

Select Certain rows and store into excel


I have an excel spread sheet , on the spreadsheet there is about 120 000 rows only with telephone numbers

I need to break this spread sheet up into segments of 4000 numbers and store them into separate spread sheets

so I should end up with 30 Spread sheets.

My 1st issue is that when do a where clause , " Where Rowno () < 4000" it works

but when I say "Where  Rowno () > 4000 and Rowno () < 8000" it doesnt seem to bring anything back

also I need to store each 4000 segment into a spread sheet

"Store [1st4000] into " it does store it into the file, but when you open it it says it is corrupt

what am I doing wrong?

3 Replies

Re: Select Certain rows and store into excel

adapt to your requirement, some suggestions

- you can store in qvd and txt

- I use recno, see the online help for difference between recno and rowno


for i = 1 to 10 step 4

  trace $(i);


  LOAD phone

  FROM aaaa.xlsx (ooxml, embedded labels, table is Sheet1)

  where recno() >= $(i) and recno()< ($(i)+4)


  STORE t into t_$(i).csv (txt);

  DROP Table t;


Contributor II

Re: Select Certain rows and store into excel

Thank you , this seems to be working

Ridhaa Hendricks

Data Analyst



This email and its contents are subject to our email legal notice which can be viewed at http://www.cellc.co.za/dl/cms/downloads/Email_legal_notice.pdf


Re: Select Certain rows and store into excel

When you think you get the answer, please close this discussion by giving Correct and Helpful answers to the posts which are useful for you.  It helps others in finding answers for similar scenarios. Thanks and good Qlik.

Community Browser