Discussion Board for collaboration on QlikView Scripting.
I' have to read a directory with .cvs file.
My goal is to read every file and estract only the section "Daily Usage" from every file. The no.line position of the "Daily Usage" section is variable.
In a previus discussion https://community.qlik.com/message/1230058#1230058 ( thanks mwoolf) we find a solution to estract the "Summary" section, but I have some problem to extend the solution for the section "Daily Usage"
Some file attached to test.
Thanks to help me
Go to Solution.
rowno() as id,
FileBaseName() as filebasename,
if(WildMatch(@1, '"Summary*'), 'S',
if(WildMatch(@1, '"Daily Usage*'), 'D',
peek('rowtype'))) as rowtype,
replace(@1, '"', '') as row
(txt, utf8, no labels, delimiter is '\t', no quotes);
SubField(row, ',', 1) as PartnerID,
SubField(row, ',', 2) as PartnerName
/* add the other fields */
WHERE not WildMatch(row, 'Summary*', 'Daily*', 'Partner*');
DROP TABLE tmp;
I dont know if this helps, but try these settings in wizard
I can see that this wont be good enough
It's a valid solution for the "Summary" section and "Daily" section too.