Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Load multiple CSV files into a table

I have attempted to adapt code from other Qlik community threads but still to no avail. All i want is to put together all the csv files in a folder into one table.

Neither of these scripts work

1) Provides no error message

vPath = 'C:\Dropbox\Trading\Data\'

For each File in FileList('$(vPath)*.csv')

TableName:

Load

Date(Date#([@1], 'DD/MM/YYYY') ) AS [Date],

[@2] AS [Open],

[@3] AS [High],

[@4] AS [Low],

[@5] AS [Close],

[@6] As [Volume],

[@7] As [Open Interest],

    LEFT(FileBaseName (), 6) as Code_CSV

From $(File);

NEXT

2) Does not recognise C:

For each vFileName in Filelist ('lib://C:\Dropbox\Trading\Data\*.csv')

      Load *,

Date(Date#([@1], 'DD/MM/YYYY') ) AS [Date],

[@2] AS [Open],

[@3] AS [High],

[@4] AS [Low],

[@5] AS [Close],

[@6] As [Volume],

[@7] As [Open Interest],

    LEFT(FileBaseName (), 6) as Code_CSV

      From [$(vFileName)]

      (txt, utf8, embedded labels, delimiter is ',', msq);

Next vFileName

21 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

If you are working with Enterprise edition, you have to get access from your Qlik Server Admin, who can enable you to use folder connections.

Anonymous
Not applicable
Author

I just tried this at home on the Cloud version connecting to a Dropbox URL using Call ScanFolder('lib://Data (qlikcloud_qlikid_camjvine18)') ; but nothing happened