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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Looping multiple .xlsx files

i have Excel file with a naming structure "OnBillingReportsNov2014","OnBillingReportsOct2014" continuing for all months

i and tying to use the below script to load the field from all months but i get an error on "next file " what could be wrong with my code?

if there is a better way to achieve this help

i am using this:

Set vFolder = 'C:\Users\abb\vvvv\WORK\OnBilling';

for each File in filelist(vFolder& '\OnbillingReports*.xlsx')

   

     VCBill:

    LOAD Date,

     Reference,

     Amount,FileName() as id

FROM

[$(File)]

(ooxml, embedded labels, table is [VC Bill]);

next file

Labels (1)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

why not loading

VCBill:

Load Date,

Reference,

Amount,,

Filename() as id

from $(Folder)'OnBillingReports*.xlsx'

View solution in original post

4 Replies
giakoum
Partner - Master II
Partner - Master II

Next File

can it be that you have it lowercase?

Anonymous
Not applicable
Author

why not loading

VCBill:

Load Date,

Reference,

Amount,,

Filename() as id

from $(Folder)'OnBillingReports*.xlsx'

Not applicable
Author

I agree with Ioannis. File in your case is an identifier. Try to keep the same letter cases on them.

Anonymous
Not applicable
Author

Thanx for ur responds i have tried it and it worked but the whole script is way more than i had put i will try and use your idea as i work through then iw ill come back to tou

thank you however