Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
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.
rido1421
Contributor II

Select Certain rows and store into excel

Hi

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
MVP
MVP

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

Directory;

for i = 1 to 10 step 4

  trace $(i);

  t:

  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;

NEXT;

rido1421
Contributor II

Re: Select Certain rows and store into excel

Thank you , this seems to be working

Ridhaa Hendricks

Data Analyst

0842276595

r.hendricks@cellc.co.za

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

MVP
MVP

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