Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rido1421
Creator III
Creator III

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

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
Creator III
Creator III
Author

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

maxgro
MVP
MVP

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.