Qlik Community

QlikView Documents

Documents for QlikView related information.

Replace characters with Ascii numbers in a string

MVP & Luminary
MVP & Luminary

Replace characters with Ascii numbers in a string

Hi,

The below code helps in replacing characters with ASCII codes in a string in Load script

For example

ABC is converted to 656667- since ASCII code of A is 65, B is 66 and C is 67.

CharMap:

Mapping LOAD

Chr(RecNo() - 1) AS Char,

RecNo() - 1 AS Asciicode

AutoGenerate 256;

Data:

LOAD

Text,

MapSubString('CharMap', Text) as formattedText

FROM DataSource;

Hope this helps.

Regards,

Jagan.

Comments
richho_microp
New Contributor III

You life saver, works perfectly.

Thank you

0 Likes
prasadcm
Contributor II

Hey,

Thanks.Worked perfectly for a certain issue.

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2014-08-26 05:06 AM
Updated by: