Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I tried to convert a QLikView application to QlikSense server application. My first step is to transfer the script to QlikSense server.
SET vHide = 1;
SET vExcelPath = [lib://Finance (hilltops_sa_carapax)/];
LET vToday = NUM(TODAY());
My file path is defined by vExcelPath
While loading a file when the path is hardcoded like :
LOAD
@1,
@2,
@3,
@4
FROM [lib://Finance (hilltops_sa_carapax)/2018-22.csv]
(txt, codepage is 1252, no labels, delimiter is ';', msq);
it works properly.
I currently have 13 file named 2018-22 until 2018-34 and I want to load all of this files by using the following LOAD statement :
PreLoad:
LOAD
ROWNO() AS PL_LineNo,
@1 AS PL_1,
@2 AS PL_2,
21 + CEIL(ROWNO() / 6 - 0.1)
AS PL_Week,
@3 AS PL_3,
@4 AS PL_4,
@5 AS PL_5,
@6 AS PL_6
FROM $(vExcelPath)2018-*.csv
(txt, codepage is 1252, no labels, delimiter is ';', msq)
WHERE LEN(TRIM(@2))>0;
The error that I receive is :
Laden van gegevens gestart
De volgende fout is opgetreden:
Unexpected token: 'hilltops_sa_carapax', expected one of: 'html', 'Header', 'biff', 'dif', 'fix', 'json', 'kml', ...
De fout is hier opgetreden:
PreLoad: LOAD ROWNO() AS PL_LineNo, @1 AS PL_1, @2 AS PL_2, 21 + CEIL(ROWNO() / 6 - 0.1) AS PL_Week, @3 AS PL_3, @4 AS PL_4, @5 AS PL_5, @6 AS PL_6 FROM lib://Finance (>>>>>>hilltops_sa_carapax<<<<<<)/2018-*.csv (txt, codepage is 1252, no labels, delimiter is ';', msq) WHERE LEN(TRIM(@2))>0
Gegevens zijn niet geladen. Corrigeer de fout en probeer opnieuw te laden.
I tried to rename the connection to ExcelFiles but QLikSense automatically changes this to ExcelFiles (hilltops_sa_carapax). I think that the error is caused by the space and/or bracket but I can't remove this characters while editing the connection.
I also tried to rename to ExcelFiles_(hilltops_sa_carapax) but this changes automatically to ExcelFiles_(hilltops_sa_carapax) (hilltops_sa_carapax).
How am I able to solve this?
Try taking the square brackets out of the variable and putting them round the whole file path after the FROM
FROM [$(vExcelPath)2018-*.CSV]
(txt, .....)