Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Can this be dynamic?

Hi


I am trying to load 5 or 6 HTML tables from the interweb but due to their nature the name of the tables will change.


This is my script:

FOR i = 0 to 5
LET vYear$(i)                                               = year(now()) - $(i);
NEXT i
LET i                                                       = nothing;

SET sBankHolsURLDotGov = 'https://www.gov.uk/bank-holidays/';

// ******************************************************** ************************ \\
BankHols:
LOAD
*,
left($(vYear0),index($(vYear0),chr(32))-1)*1                as BankHolidayDay,
left([2014] ,index([2014]   ,chr(32))-1)*1                  as BankHolidayDay_Hardcoded
;

LOAD
*
//   $(vYear0) //[2014],
//    $(vYear0)&'2', //[20142]
FROM
[https://www.gov.uk/bank-holidays/](
html, codepage is 1252, embedded labels, table is @1)
;


As you can see, I would like to use variables to refer to Field.


Also I tried to replace the "@1" section of the (html, codepage... ) From statement with a dynamic variable but this also fails.  Is all of this impossible or am I just failing due to incorrect syntax?


Thanks

Oli


Labels (1)
1 Reply
Not applicable
Author

Due to the moderation and a mix up this post was duplicated.  So, I am closing this one.  If you have any ideas please could you reply on this thread Can this be dynamic

Thanks

Oli