Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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
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
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
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
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.
This is not helping Ashfaq.
Thanks
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
Add a trace within your procedure to confirm that the correct folders and files are being processed.
TRACE $(Dir)/$(File) ;