Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
jyothish8807
Master II
Master II

Issue creating Qvd


Hi All,

     I have created an dashboard in which i am pulling data from 100 Excel sheets which have same colums and are placed in different folders.I am using a "Do Dir()" script to pull all this data together.Now when i try to store these into "Qvd' it is storing the data of the first sheet only and ignorining the rest 99 sheets.Over here in "c:\data" there is 100 folders each having one file each.So iam pulling all the files together.Any help will be appriciated.

SUB DoDir (Root)

FOR each File in filelist(Root& '\*.xlsm')


Table:
LOAD Sino,
     Name
   
     FROM
[$(File)]
(ooxml, embedded labels, table is Data, filters(
Remove(Row, Pos(Top, 1))
));

NEXT File
FOR each Dir in dirlist (Root&'\*')
CALL DoDir(Dir)
NEXT Dir
END SUB
CALL DoDir('\\c:\data');

store Table into 'F:\QVD\Test.qvd';

Thanks

Jyothish KC

Best Regards,
KC
10 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Can you post the Document Log from the script reload? It sounds like your loads are not getting automatically concatenated into the single table named "Table", Can you check the Table Viewer (Ctrl-t) to confirm?

If they are not auto concatenating, you may want to add "CONCATENATE" as a prefix to your Table LOAD statement.

-Rob

engishfaque
Specialist III
Specialist III

Dear Jyothish,

Please check Drive F and verify that, is there QVD folder exist of not?

Then Try this one,

STORE Actual into F:\QVD\Test.qvd (qvd);

Kind regards,

Ishfaque Ahmed

ashfaq_haseeb
Champion III
Champion III

Hi,

make sure you have same file structure, if not then force concatenate as rob suggested.

change your store statement as below

Old --> store Table into 'F:\QVD\Test.qvd';

New --> store Table into F:\QVD\Test.qvd(qvd);


Regards

ASHFAQ

jyothish8807
Master II
Master II
Author

     Yes Ahmed, Qvd is getting created. But it have data of 1st sheet only rest 99 sheets data is not getting stored.

Regards

Jyothish KC

Best Regards,
KC
jyothish8807
Master II
Master II
Author

Hi Rob,

Over here Do Dir() script is responsible for consollidating all the 100 sheets.Issue over here is tha i cant name the table above the Do dir (), so i name it Table: after the do dir(). Now when i store these into QVD i think its storing the info which falls under table: and ignoring the Do Dir() line.

Regards

Jyothish KC

Best Regards,
KC
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

LET vLoop = 1;


SUB DoDir (Root)

FOR each File in filelist(Root& '\*.xlsm')

If vLoop = 1 THEN
Table:
LOAD Sino,
     Name
   
     FROM
[$(File)]
(ooxml, embedded labels, table is Data, filters(
Remove(Row, Pos(Top, 1))
));

ELSE

Concatenate(Table)

LOAD Sino,

     Name

   

     FROM

[$(File)]

(ooxml, embedded labels, table is Data, filters(

Remove(Row, Pos(Top, 1))

));

END IF

LET vLoop = vLoop  + 1;

NEXT File
FOR each Dir in dirlist (Root&'\*')

LET vLoop = 1;
CALL DoDir(Dir)
NEXT Dir
END SUB
CALL DoDir('\\c:\data');

store Table into 'F:\QVD\Test.qvd';

Regards,

Jagan.

jyothish8807
Master II
Master II
Author

This is not helping Ashfaq.

Thanks

Best Regards,
KC
jyothish8807
Master II
Master II
Author

Over here also the issues is that vloop script is above table name (table:) and while store the Table, its ignoring the script above table name (table:)

Regards

Jyothish KC

Best Regards,
KC
Colin-Albert
Partner - Champion
Partner - Champion

Add a trace within your procedure to confirm that the correct folders and files are being processed.

TRACE $(Dir)/$(File) ;