Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I want to import 11 .xls files into sense in a smart way.
Using a load with a for...next to do this preceeded by a mapping that I created to map up specific transactions.
Question 1:
Is this a smart way to solve the problem or is there another more smooth way? Am I missing any details in my code, I suspect there is something wrong with my for...next?
Question 2:
Why is table 2 used to get any content in qlik and not table 1? I do not understand that (I have attached an example) when the file only have one table?
for a=201410 to 201411
Lönekonto_TPL:
LOAD
@1 as Bokföringsdatum,
@2 as Transaktionsdatum,
@3 as Enskild_Transaktion,
@4 as Belopp,
@5 as Behållning,
ApplyMap('mapping_transaktionstyp',@3,'Ej Mappat') as Transaktionstyp, //använder mappning
ApplyMap('mapping_transaktion',@3,'Ej Träff') as Transaktion
FROM [lib://Lönekonto TPL/file$(a).xls]
(html, codepage is 1252, no labels, table is @2)
Where RecNo()>=3; //bestämmer vilken rad man börjar läsa in på
next
Why not use a wildcard load?
Lönekonto_TPL:
LOAD
@1 as Bokföringsdatum,
@2 as Transaktionsdatum,
@3 as Enskild_Transaktion,
@4 as Belopp,
@5 as Behållning,
ApplyMap('mapping_transaktionstyp',@3,'Ej Mappat') as Transaktionstyp, //använder mappning
ApplyMap('mapping_transaktion',@3,'Ej Träff') as Transaktion
FROM [lib://Lönekonto TPL/*.xls]
(biff, no labels, table is Sheet1$)
Where RecNo()>=3; //bestämmer vilken rad man börjar läsa in på
Why not use a wildcard load?
Lönekonto_TPL:
LOAD
@1 as Bokföringsdatum,
@2 as Transaktionsdatum,
@3 as Enskild_Transaktion,
@4 as Belopp,
@5 as Behållning,
ApplyMap('mapping_transaktionstyp',@3,'Ej Mappat') as Transaktionstyp, //använder mappning
ApplyMap('mapping_transaktion',@3,'Ej Träff') as Transaktion
FROM [lib://Lönekonto TPL/*.xls]
(biff, no labels, table is Sheet1$)
Where RecNo()>=3; //bestämmer vilken rad man börjar läsa in på
Hello
and what about the storage of the qvd?
It will be Lönekonto_TPL.qvd
or
Lönekonto_TPL2014 ....
Lönekonto_TPL2015 ....
Thank u Gysbert. It worked perfectly! BR T
Thx for the tip! Will use it! BR T