Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all,
I need help. I have to load an excel file every day, but only current day file. So, i try to use a var in script... but doesn't work.
LOAD * FROM [$(Ruta)] (ooxml, embedded labels, header is 3 lines, table is SN);
Var definition:
'D:\QV\App\data(' & date(today(),'YYYY-MM-DD')& ')*'
Please could you help??
Are you using SET or LET? Try with LET
LET Ruta = 'D:\QV\App\data(' & date(today(),'YYYY-MM-DD')& ')*.xlsx';
LOAD *
FROM [$(Ruta)]
(ooxml, embedded labels, header is 3 lines, table is SN);
Hi try this way in script.
Let vDate = Date(Today(),'YYYY-MM-DD')&'.xls';
Load * from 'D:\QV\App\data'&$(vDate)
(ooxml, embedded labels, header is 3 lines, table is SN);
;
Regards,
Kaushik Solanki
Are you using SET or LET? Try with LET
LET Ruta = 'D:\QV\App\data(' & date(today(),'YYYY-MM-DD')& ')*.xlsx';
LOAD *
FROM [$(Ruta)]
(ooxml, embedded labels, header is 3 lines, table is SN);
Thanks Sunny
Did you want to thank Kaushik? Seems like his solution worked for you
Please mark his response as correct to close the thread down.
Best,
Sunny
Actually the LET is optional. A clean variable assignment a = b; also expects b to be an expression (or a quoted string or whatever).
The SET on the other hand isn't optional.
But you're probably right. The variable overview shows that Ruta contains a stringized expression, not an evaluated expression. So aside from replacing a SET by a LET, IIRC it could also be fixed by doing something like:
LOAD * FROM [$(=Ruta)] (options);
no?
Thanks stalwar1.
What is important is Francisco got the solution.
Regards,
Kaushik Solanki