SQLTable TABLE_NAME Variable not Matching Sheet Name for Excel Load
Hi Guys, What is wrong with the below script? The variable is pulling the table names from an excel sheet using SQLTables Function. The variable seems to be fine as i can see it in the Trace statement - but when i call the variable inserted into the load statement as ' Table is '$(vTable)')' it seems as if it can't match the Variable and the sheet in Excel. In short there is a discrepancy between SQLTables table names and the excel sheet tables names because when i come to call upon the sheets in the load it cannot identify/find them.
LIB CONNECT TO 'CRTrackerTest (924034-qlik_924034-admin)';
LOAD 0 as Dummy AutoGenerate 0;
For i = 0 To NoOfRows('TABLES')
Let vTable = Peek('TABLE_NAME', $(i), 'TABLES');
Trace This is vTables Value: $(vTable);
Implemented as Date,
FROM [lib://ExcelSheets (924034-qlik_924034-admin)/CR Tracker.xls]
I Don't use Sense but qlikview, normally the same but maybe I'm missing something. If so maybe others can help you..
One suggestion maybe, do you have something like a file wizard that generates the load script for a file? Maybe you can try to load just this one tab Apr 2018 using a wizard and see if and what the differences are in syntax.
There is a wizard yes thank you! Interestingly it is with all sorts Dollars, single quotes and underscores. This must be the problem. which means SQLTables is pulling the data out exactly as the ODBC connection reads the sheet names. i will remove the purge character and see if that works