<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to generate xuser &amp; xpassword in txt file in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-generate-xuser-xpassword-in-txt-file/m-p/815005#M287444</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the xuserid and xpassword are encoded not encrypted. I would recommend you use an external script to store them encoded in the text files and then load them in QlikView using a regular load from file and connect to ODBC. Altought it is not advisable to store regular user/passwords in a text file in the server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if you want QlikView to LOAD the the user/password pair and encode them to pass to the odbc connection string, you can add the following .vbs file (import thru edit module Ctrl-M) in the script editor and test, this is something I have never used in the past, but you can try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.6000003814697px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Base64Encode(useridfromtextfile) as UseridTOConnect,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.6000003814697px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.6000003814697px;"&gt;Base64Encode(passwordidfromtextfile) as PasswordidTOConnect&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.6000003814697px;"&gt;FROM yourtextfile;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.6000003814697px;"&gt;so Basically you are scrambiling them from the source .&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--save this file into a directory and import it to your qview document to call the functions before connecting to odbc&lt;/P&gt;&lt;P&gt;Function Base64Decode(&lt;SPAN style="color: blue;"&gt;ByVal&lt;/SPAN&gt; base64String)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'rfc1521&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'1999 Antonin Foller &lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Const&lt;/SPAN&gt; Base64 = &lt;SPAN style="color: #a52a2a;"&gt;"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Dim&lt;/SPAN&gt; dataLength, sOut, groupBegin&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'remove white spaces, &lt;SPAN style="color: blue;"&gt;If&lt;/SPAN&gt; any&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; base64String = Replace(base64String, &lt;SPAN style="color: blue;"&gt;vbCrLf&lt;/SPAN&gt;, &lt;SPAN style="color: #a52a2a;"&gt;""&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp; base64String = Replace(base64String, vbTab, &lt;SPAN style="color: #a52a2a;"&gt;""&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp; base64String = Replace(base64String, &lt;SPAN style="color: #a52a2a;"&gt;" "&lt;/SPAN&gt;, &lt;SPAN style="color: #a52a2a;"&gt;""&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'The source must consists from groups with &lt;SPAN style="color: blue;"&gt;Len&lt;/SPAN&gt; of 4 chars&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; dataLength = &lt;SPAN style="color: blue;"&gt;Len&lt;/SPAN&gt;(base64String)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;If&lt;/SPAN&gt; dataLength Mod 4 &amp;lt;&amp;gt; 0 &lt;SPAN style="color: blue;"&gt;Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Err.Raise&lt;/SPAN&gt; 1, &lt;SPAN style="color: #a52a2a;"&gt;"Base64Decode"&lt;/SPAN&gt;, &lt;SPAN style="color: #a52a2a;"&gt;"Bad Base64 string."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Exit Function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;End If&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: green;"&gt;' Now decode each group:&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;For&lt;/SPAN&gt; groupBegin = 1 &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; dataLength &lt;SPAN style="color: blue;"&gt;Step&lt;/SPAN&gt; 4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Dim&lt;/SPAN&gt; numDataBytes, CharCounter, thisChar, thisData, nGroup, pOut&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;' Each data group encodes up &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; 3 actual bytes.&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; numDataBytes = 3&lt;/P&gt;&lt;P&gt;&amp;nbsp; nGroup = 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;For&lt;/SPAN&gt; CharCounter = 0 &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;' Convert each character into 6 bits of data, &lt;SPAN style="color: blue;"&gt;And&lt;/SPAN&gt; add it &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;' an integer &lt;SPAN style="color: blue;"&gt;For&lt;/SPAN&gt; temporary storage.&amp;nbsp; &lt;SPAN style="color: blue;"&gt;If&lt;/SPAN&gt; a character is a '=', there&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;' is one fewer data byte. (There can only be a maximum of 2 '=' &lt;SPAN style="color: blue;"&gt;In&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;' the whole string.)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; thisChar = &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(base64String, groupBegin + CharCounter, 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;If&lt;/SPAN&gt; thisChar = &lt;SPAN style="color: #a52a2a;"&gt;"="&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; numDataBytes = numDataBytes - 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; thisData = 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; thisData = &lt;SPAN style="color: blue;"&gt;InStr&lt;/SPAN&gt;(1, Base64, thisChar, vbBinaryCompare) - 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;End If&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;If&lt;/SPAN&gt; thisData = -1 &lt;SPAN style="color: blue;"&gt;Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Err.Raise&lt;/SPAN&gt; 2, &lt;SPAN style="color: #a52a2a;"&gt;"Base64Decode"&lt;/SPAN&gt;, &lt;SPAN style="color: #a52a2a;"&gt;"Bad character &lt;SPAN style="color: blue;"&gt;In&lt;/SPAN&gt; Base64 string."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Exit Function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;End If&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; nGroup = 64 * nGroup + thisData&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'Hex splits the long &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; 6 groups with 4 bits&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; nGroup = Hex(nGroup)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'Add leading zeros&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; nGroup = String(6 - &lt;SPAN style="color: blue;"&gt;Len&lt;/SPAN&gt;(nGroup), &lt;SPAN style="color: #a52a2a;"&gt;"0"&lt;/SPAN&gt;) &amp;amp; nGroup&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'Convert the 3 byte hex integer (6 chars) &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; 3 characters&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; pOut = &lt;SPAN style="color: blue;"&gt;Chr&lt;/SPAN&gt;(CByte(&lt;SPAN style="color: #a52a2a;"&gt;"&amp;amp;H"&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(nGroup, 1, 2))) + _&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Chr&lt;/SPAN&gt;(CByte(&lt;SPAN style="color: #a52a2a;"&gt;"&amp;amp;H"&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(nGroup, 3, 2))) + _&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Chr&lt;/SPAN&gt;(CByte(&lt;SPAN style="color: #a52a2a;"&gt;"&amp;amp;H"&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(nGroup, 5, 2)))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'add numDataBytes characters &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; out string&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; sOut = sOut &amp;amp; &lt;SPAN style="color: blue;"&gt;Left&lt;/SPAN&gt;(pOut, numDataBytes)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Base64Decode = sOut&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue;"&gt;End Function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue;"&gt;Function&lt;/SPAN&gt; Base64Encode(inData)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'rfc1521&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'2001 Antonin Foller, &lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Const&lt;/SPAN&gt; Base64 = &lt;SPAN style="color: #a52a2a;"&gt;"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Dim&lt;/SPAN&gt; cOut, sOut, I&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'For each group of 3 bytes&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;For&lt;/SPAN&gt; I = 1 &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;Len&lt;/SPAN&gt;(inData) &lt;SPAN style="color: blue;"&gt;Step&lt;/SPAN&gt; 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Dim&lt;/SPAN&gt; nGroup, pOut, sGroup&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'Create one long from this 3 bytes.&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; nGroup = &amp;amp;H10000 * &lt;SPAN style="color: blue;"&gt;Asc&lt;/SPAN&gt;(&lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(inData, I, 1)) + _&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;amp;H100 * MyASC(&lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(inData, I + 1, 1)) + MyASC(&lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(inData, I + 2, 1))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'Oct splits the long &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; 8 groups with 3 bits&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; nGroup = Oct(nGroup)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'Add leading zeros&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; nGroup = String(8 - &lt;SPAN style="color: blue;"&gt;Len&lt;/SPAN&gt;(nGroup), &lt;SPAN style="color: #a52a2a;"&gt;"0"&lt;/SPAN&gt;) &amp;amp; nGroup&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'Convert &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; base64&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; pOut = &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(Base64, CLng(&lt;SPAN style="color: #a52a2a;"&gt;"&amp;amp;o"&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(nGroup, 1, 2)) + 1, 1) + _&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(Base64, CLng(&lt;SPAN style="color: #a52a2a;"&gt;"&amp;amp;o"&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(nGroup, 3, 2)) + 1, 1) + _&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(Base64, CLng(&lt;SPAN style="color: #a52a2a;"&gt;"&amp;amp;o"&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(nGroup, 5, 2)) + 1, 1) + _&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(Base64, CLng(&lt;SPAN style="color: #a52a2a;"&gt;"&amp;amp;o"&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(nGroup, 7, 2)) + 1, 1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'Add the part &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;OutPut&lt;/SPAN&gt; string&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; sOut = sOut + pOut&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'Add a new line &lt;SPAN style="color: blue;"&gt;For Each&lt;/SPAN&gt; 76 chars &lt;SPAN style="color: blue;"&gt;In&lt;/SPAN&gt; dest (76*3/4 = 57)&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'If (I + 2) Mod 57 = 0 &lt;SPAN style="color: blue;"&gt;Then&lt;/SPAN&gt; sOut = sOut + &lt;SPAN style="color: blue;"&gt;vbCrLf&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Select Case&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;Len&lt;/SPAN&gt;(inData) Mod 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Case&lt;/SPAN&gt; 1: &lt;SPAN style="color: green;"&gt;'8 bit final&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; sOut = &lt;SPAN style="color: blue;"&gt;Left&lt;/SPAN&gt;(sOut, &lt;SPAN style="color: blue;"&gt;Len&lt;/SPAN&gt;(sOut) - 2) + &lt;SPAN style="color: #a52a2a;"&gt;"=="&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Case&lt;/SPAN&gt; 2: &lt;SPAN style="color: green;"&gt;'16 bit final&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; sOut = &lt;SPAN style="color: blue;"&gt;Left&lt;/SPAN&gt;(sOut, &lt;SPAN style="color: blue;"&gt;Len&lt;/SPAN&gt;(sOut) - 1) + &lt;SPAN style="color: #a52a2a;"&gt;"="&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;End Select&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Base64Encode = sOut&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue;"&gt;End Function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue;"&gt;Function&lt;/SPAN&gt; MyASC(OneChar)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;If&lt;/SPAN&gt; OneChar = &lt;SPAN style="color: #a52a2a;"&gt;""&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;Then&lt;/SPAN&gt; MyASC = 0 &lt;SPAN style="color: blue;"&gt;Else&lt;/SPAN&gt; MyASC = &lt;SPAN style="color: blue;"&gt;Asc&lt;/SPAN&gt;(OneChar)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue;"&gt;End Function&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Jan 2015 03:32:50 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-01-05T03:32:50Z</dc:date>
    <item>
      <title>How to generate xuser &amp; xpassword in txt file</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-generate-xuser-xpassword-in-txt-file/m-p/815004#M287443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Community:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now we have a issue, customer want to read the xuserid &amp;amp; xpassword from txt file or excel file, then connect to db thru ODBC, thus , have any solution or tool can change userid and password to xuserid and xpassword ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QV Server: 11.20 SR9&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Kent Liao &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 02:29:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-generate-xuser-xpassword-in-txt-file/m-p/815004#M287443</guid>
      <dc:creator>kentliao66</dc:creator>
      <dc:date>2015-01-05T02:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to generate xuser &amp; xpassword in txt file</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-generate-xuser-xpassword-in-txt-file/m-p/815005#M287444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the xuserid and xpassword are encoded not encrypted. I would recommend you use an external script to store them encoded in the text files and then load them in QlikView using a regular load from file and connect to ODBC. Altought it is not advisable to store regular user/passwords in a text file in the server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, if you want QlikView to LOAD the the user/password pair and encode them to pass to the odbc connection string, you can add the following .vbs file (import thru edit module Ctrl-M) in the script editor and test, this is something I have never used in the past, but you can try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.6000003814697px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Base64Encode(useridfromtextfile) as UseridTOConnect,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.6000003814697px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.6000003814697px;"&gt;Base64Encode(passwordidfromtextfile) as PasswordidTOConnect&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.6000003814697px;"&gt;FROM yourtextfile;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.6000003814697px;"&gt;so Basically you are scrambiling them from the source .&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--save this file into a directory and import it to your qview document to call the functions before connecting to odbc&lt;/P&gt;&lt;P&gt;Function Base64Decode(&lt;SPAN style="color: blue;"&gt;ByVal&lt;/SPAN&gt; base64String)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'rfc1521&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'1999 Antonin Foller &lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Const&lt;/SPAN&gt; Base64 = &lt;SPAN style="color: #a52a2a;"&gt;"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Dim&lt;/SPAN&gt; dataLength, sOut, groupBegin&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'remove white spaces, &lt;SPAN style="color: blue;"&gt;If&lt;/SPAN&gt; any&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; base64String = Replace(base64String, &lt;SPAN style="color: blue;"&gt;vbCrLf&lt;/SPAN&gt;, &lt;SPAN style="color: #a52a2a;"&gt;""&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp; base64String = Replace(base64String, vbTab, &lt;SPAN style="color: #a52a2a;"&gt;""&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp; base64String = Replace(base64String, &lt;SPAN style="color: #a52a2a;"&gt;" "&lt;/SPAN&gt;, &lt;SPAN style="color: #a52a2a;"&gt;""&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'The source must consists from groups with &lt;SPAN style="color: blue;"&gt;Len&lt;/SPAN&gt; of 4 chars&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; dataLength = &lt;SPAN style="color: blue;"&gt;Len&lt;/SPAN&gt;(base64String)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;If&lt;/SPAN&gt; dataLength Mod 4 &amp;lt;&amp;gt; 0 &lt;SPAN style="color: blue;"&gt;Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Err.Raise&lt;/SPAN&gt; 1, &lt;SPAN style="color: #a52a2a;"&gt;"Base64Decode"&lt;/SPAN&gt;, &lt;SPAN style="color: #a52a2a;"&gt;"Bad Base64 string."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Exit Function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;End If&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: green;"&gt;' Now decode each group:&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;For&lt;/SPAN&gt; groupBegin = 1 &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; dataLength &lt;SPAN style="color: blue;"&gt;Step&lt;/SPAN&gt; 4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Dim&lt;/SPAN&gt; numDataBytes, CharCounter, thisChar, thisData, nGroup, pOut&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;' Each data group encodes up &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; 3 actual bytes.&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; numDataBytes = 3&lt;/P&gt;&lt;P&gt;&amp;nbsp; nGroup = 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;For&lt;/SPAN&gt; CharCounter = 0 &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;' Convert each character into 6 bits of data, &lt;SPAN style="color: blue;"&gt;And&lt;/SPAN&gt; add it &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;' an integer &lt;SPAN style="color: blue;"&gt;For&lt;/SPAN&gt; temporary storage.&amp;nbsp; &lt;SPAN style="color: blue;"&gt;If&lt;/SPAN&gt; a character is a '=', there&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;' is one fewer data byte. (There can only be a maximum of 2 '=' &lt;SPAN style="color: blue;"&gt;In&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;' the whole string.)&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; thisChar = &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(base64String, groupBegin + CharCounter, 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;If&lt;/SPAN&gt; thisChar = &lt;SPAN style="color: #a52a2a;"&gt;"="&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; numDataBytes = numDataBytes - 1&lt;/P&gt;&lt;P&gt;&amp;nbsp; thisData = 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Else&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; thisData = &lt;SPAN style="color: blue;"&gt;InStr&lt;/SPAN&gt;(1, Base64, thisChar, vbBinaryCompare) - 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;End If&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;If&lt;/SPAN&gt; thisData = -1 &lt;SPAN style="color: blue;"&gt;Then&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Err.Raise&lt;/SPAN&gt; 2, &lt;SPAN style="color: #a52a2a;"&gt;"Base64Decode"&lt;/SPAN&gt;, &lt;SPAN style="color: #a52a2a;"&gt;"Bad character &lt;SPAN style="color: blue;"&gt;In&lt;/SPAN&gt; Base64 string."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Exit Function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;End If&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; nGroup = 64 * nGroup + thisData&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'Hex splits the long &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; 6 groups with 4 bits&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; nGroup = Hex(nGroup)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'Add leading zeros&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; nGroup = String(6 - &lt;SPAN style="color: blue;"&gt;Len&lt;/SPAN&gt;(nGroup), &lt;SPAN style="color: #a52a2a;"&gt;"0"&lt;/SPAN&gt;) &amp;amp; nGroup&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'Convert the 3 byte hex integer (6 chars) &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; 3 characters&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; pOut = &lt;SPAN style="color: blue;"&gt;Chr&lt;/SPAN&gt;(CByte(&lt;SPAN style="color: #a52a2a;"&gt;"&amp;amp;H"&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(nGroup, 1, 2))) + _&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Chr&lt;/SPAN&gt;(CByte(&lt;SPAN style="color: #a52a2a;"&gt;"&amp;amp;H"&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(nGroup, 3, 2))) + _&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Chr&lt;/SPAN&gt;(CByte(&lt;SPAN style="color: #a52a2a;"&gt;"&amp;amp;H"&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(nGroup, 5, 2)))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'add numDataBytes characters &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; out string&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; sOut = sOut &amp;amp; &lt;SPAN style="color: blue;"&gt;Left&lt;/SPAN&gt;(pOut, numDataBytes)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Base64Decode = sOut&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue;"&gt;End Function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue;"&gt;Function&lt;/SPAN&gt; Base64Encode(inData)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'rfc1521&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'2001 Antonin Foller, &lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Const&lt;/SPAN&gt; Base64 = &lt;SPAN style="color: #a52a2a;"&gt;"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Dim&lt;/SPAN&gt; cOut, sOut, I&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'For each group of 3 bytes&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;For&lt;/SPAN&gt; I = 1 &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;Len&lt;/SPAN&gt;(inData) &lt;SPAN style="color: blue;"&gt;Step&lt;/SPAN&gt; 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Dim&lt;/SPAN&gt; nGroup, pOut, sGroup&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'Create one long from this 3 bytes.&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; nGroup = &amp;amp;H10000 * &lt;SPAN style="color: blue;"&gt;Asc&lt;/SPAN&gt;(&lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(inData, I, 1)) + _&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;amp;H100 * MyASC(&lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(inData, I + 1, 1)) + MyASC(&lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(inData, I + 2, 1))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'Oct splits the long &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; 8 groups with 3 bits&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; nGroup = Oct(nGroup)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'Add leading zeros&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; nGroup = String(8 - &lt;SPAN style="color: blue;"&gt;Len&lt;/SPAN&gt;(nGroup), &lt;SPAN style="color: #a52a2a;"&gt;"0"&lt;/SPAN&gt;) &amp;amp; nGroup&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'Convert &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; base64&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; pOut = &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(Base64, CLng(&lt;SPAN style="color: #a52a2a;"&gt;"&amp;amp;o"&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(nGroup, 1, 2)) + 1, 1) + _&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(Base64, CLng(&lt;SPAN style="color: #a52a2a;"&gt;"&amp;amp;o"&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(nGroup, 3, 2)) + 1, 1) + _&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(Base64, CLng(&lt;SPAN style="color: #a52a2a;"&gt;"&amp;amp;o"&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(nGroup, 5, 2)) + 1, 1) + _&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(Base64, CLng(&lt;SPAN style="color: #a52a2a;"&gt;"&amp;amp;o"&lt;/SPAN&gt; &amp;amp; &lt;SPAN style="color: blue;"&gt;Mid&lt;/SPAN&gt;(nGroup, 7, 2)) + 1, 1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'Add the part &lt;SPAN style="color: blue;"&gt;To&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;OutPut&lt;/SPAN&gt; string&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; sOut = sOut + pOut&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'Add a new line &lt;SPAN style="color: blue;"&gt;For Each&lt;/SPAN&gt; 76 chars &lt;SPAN style="color: blue;"&gt;In&lt;/SPAN&gt; dest (76*3/4 = 57)&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: green;"&gt;'If (I + 2) Mod 57 = 0 &lt;SPAN style="color: blue;"&gt;Then&lt;/SPAN&gt; sOut = sOut + &lt;SPAN style="color: blue;"&gt;vbCrLf&lt;/SPAN&gt;&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Select Case&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;Len&lt;/SPAN&gt;(inData) Mod 3&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Case&lt;/SPAN&gt; 1: &lt;SPAN style="color: green;"&gt;'8 bit final&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; sOut = &lt;SPAN style="color: blue;"&gt;Left&lt;/SPAN&gt;(sOut, &lt;SPAN style="color: blue;"&gt;Len&lt;/SPAN&gt;(sOut) - 2) + &lt;SPAN style="color: #a52a2a;"&gt;"=="&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;Case&lt;/SPAN&gt; 2: &lt;SPAN style="color: green;"&gt;'16 bit final&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp; sOut = &lt;SPAN style="color: blue;"&gt;Left&lt;/SPAN&gt;(sOut, &lt;SPAN style="color: blue;"&gt;Len&lt;/SPAN&gt;(sOut) - 1) + &lt;SPAN style="color: #a52a2a;"&gt;"="&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;End Select&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Base64Encode = sOut&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue;"&gt;End Function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue;"&gt;Function&lt;/SPAN&gt; MyASC(OneChar)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="color: blue;"&gt;If&lt;/SPAN&gt; OneChar = &lt;SPAN style="color: #a52a2a;"&gt;""&lt;/SPAN&gt; &lt;SPAN style="color: blue;"&gt;Then&lt;/SPAN&gt; MyASC = 0 &lt;SPAN style="color: blue;"&gt;Else&lt;/SPAN&gt; MyASC = &lt;SPAN style="color: blue;"&gt;Asc&lt;/SPAN&gt;(OneChar)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: blue;"&gt;End Function&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Jan 2015 03:32:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-generate-xuser-xpassword-in-txt-file/m-p/815005#M287444</guid>
      <dc:creator />
      <dc:date>2015-01-05T03:32:50Z</dc:date>
    </item>
  </channel>
</rss>

