Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Qlikview to read different .csv files at the same time

Hi

I am using QV for sports analysis reports

Currently, I get data from 2 separate sources which export the data as .csv files

For csv file 1, I use the following to import the csv

FROM

[$(vPATH)\*.csv]

(txt, unicode, embedded labels, delimiter is '\t', msq);

This does not pick up csv file 2

For csv 2 I have to use the following to import the csv (When using this path, QV does not pick up csv file 1

FROM

[$(vPATH)\*.csv]

(txt, codepage is 1252, embedded labels, delimiter is ',', msq);

Is there a way for QV to pick up both types of CSV files I Have attached samples of both csv files

3 Replies
nagireddy_qv
Contributor II

Re: Qlikview to read different .csv files at the same time

Hi

I think ,its not possible . you have to load one by one only..

t_chetirbok
Valued Contributor

Re: Qlikview to read different .csv files at the same time

Hello!

So, why are you can't load from both files and concatenate it?

load *

FROM

[$(vPATH)\FILE1.csv]

(txt, unicode, embedded labels, delimiter is '\t', msq);

concatenate

load *

FROM

[$(vPATH)\FILE2.csv]

(txt, unicode, embedded labels, delimiter is '\t', msq);

puttemans
Valued Contributor

Re: Qlikview to read different .csv files at the same time

Hi there,

Your path is the same, but is seems that the files are not similar as the third lie of code differs for both of them. If you can align them, you could load multiple csv-files one after another in the same script.

I have it in an application scripted by someone else, and it works fine. Below is the syntax, it may help you.

for each FileExtension in 'qvd'

  for each FoundFile in filelist( '$(vQVDPath)\Fact\'& 'Travel aggregate_*.' & FileExtension)

            Filelist:

            LOAD DISTINCT

                Class,

                %TempProdKey,

                [%Sales Channel]

            FROM [$(FoundFile)] (qvd);

    next FoundFile

  next FileExtension

Regards,

Johan

Community Browser