Documents for QlikView related information.
Here a test file I created for a client, who needed to import data from a database, but text was only available in hex code.
Using an inline table, hex text is converted to plain text.
Note: Edited by Community Moderator for clarity.
Interesting idea but how can you be sure that the 2 Byte replace hits the right position all time?
Hex code is 2 Byte code always, so you might have to do an alignment to start of, but once you start at the right position, the process will continue on the right path.
Another way, create a function in Macro script ...
function HexToDec(num) HexToDec = clng(num)end function
... then call in script ...
Data: LOAD Form_Text, rowno() as FormID, Chr(HexToDec('&h' & mid(Form_Text,iterno()*2-1,2))) as letter while iterno()/2<len(Form_Text); LOAD * INLINE [ Text Number,Language,Number of Lines,Form_Text ....
.. and then rebuild the string ...
FinalData: Load Form_Text, concat(letter,'',FormID) as Decode resident Data group by Form_Text;
I think a combination of MapSubString and while iterno()/2 would be the best case..
Not necessarily since your Mapping Load is incomplete, let's say text in hex is: 22100A
the MapSubString will replace "21" first (top down processing), which would be wrong..
However, I think it would be more save to have a complete Mapping Table 00 to FF..
I agree... this was enough for the customer however, as it was all general text based data.