<?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 Set Variables using excel file in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Variables-using-excel-file/m-p/603704#M1105769</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I currently set variables at the start of my load script like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Set vStore1 = '1036'&amp;nbsp; ;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Set vStore2 = '1179'&amp;nbsp; ;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Set vStore3 = '0980'&amp;nbsp; ;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to keep my variables in an excel file, with these columns (see image attached):&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Variable Name, Store Number&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know how to do this from a text file, but the idea is for users to go to the Excel File and change the stores which are loaded into the module.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Apr 2014 15:18:19 GMT</pubDate>
    <dc:creator>gerhardl</dc:creator>
    <dc:date>2014-04-04T15:18:19Z</dc:date>
    <item>
      <title>Set Variables using excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variables-using-excel-file/m-p/603704#M1105769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I currently set variables at the start of my load script like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Set vStore1 = '1036'&amp;nbsp; ;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Set vStore2 = '1179'&amp;nbsp; ;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Set vStore3 = '0980'&amp;nbsp; ;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to keep my variables in an excel file, with these columns (see image attached):&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;Variable Name, Store Number&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I know how to do this from a text file, but the idea is for users to go to the Excel File and change the stores which are loaded into the module.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 15:18:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variables-using-excel-file/m-p/603704#M1105769</guid>
      <dc:creator>gerhardl</dc:creator>
      <dc:date>2014-04-04T15:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variables using excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variables-using-excel-file/m-p/603705#M1105770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paste this in your script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;VARL: NoConcatenate LOAD VarName, VarSetting FROM TEST_Sonia.xlsx (ooxml, embedded labels, table is LET);&lt;/P&gt;&lt;P&gt;VARS: NoConcatenate LOAD VarName, VarSetting FROM TEST_Sonia.xlsx (ooxml, embedded labels, table is SET);&lt;/P&gt;&lt;P&gt;CONN: NoConcatenate LOAD ODBCName FROM Data.xlsx (ooxml, embedded labels, table is ODBC);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FOR idx = 0 to NoOfRows('VARL')-1; LET VN = Peek('VarName', idx, 'VARL'); LET VS = Peek('VarSetting', idx, 'VARL'); LET $(VN) = $(VS)&amp;nbsp; ; NEXT&lt;/P&gt;&lt;P&gt;FOR idx = 0 to NoOfRows('VARS')-1; LET VN = Peek('VarName', idx, 'VARS'); LET VS = Peek('VarSetting', idx, 'VARS'); SET $(VN) = '$(VS)'; NEXT&lt;/P&gt;&lt;P&gt;FOR idx = 0 to NoOfRows('CONN')-1; LET DB = Peek('ODBCName', idx, 'CONN'); ODBC CONNECT to $(DB); NEXT&lt;/P&gt;&lt;P&gt;DROP Tables VARL, VARS, CONN;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where Data.xlsx is the attachment&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 15:25:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variables-using-excel-file/m-p/603705#M1105770</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2014-04-04T15:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variables using excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variables-using-excel-file/m-p/603706#M1105771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Temp_Variables:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Variable Name],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Store Number]&lt;/P&gt;&lt;P&gt;FROM &lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;............\Variables.xls]&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is [Sheet1$]);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for i = 0 to NoOfRows('Temp_Variables') - 1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; let vName = peek('Variable Name', i, 'Temp_Variables'); // Name of the variable&lt;/P&gt;&lt;P&gt;&amp;nbsp; let $(vName) = peek('Store Number', i, 'Temp_Variables'); // Number of the variable&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;next i&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;let i = null();&lt;/P&gt;&lt;P&gt;let vName = null();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Temp_Variables;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 15:27:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variables-using-excel-file/m-p/603706#M1105771</guid>
      <dc:creator>yduval75</dc:creator>
      <dc:date>2014-04-04T15:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: Set Variables using excel file</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Variables-using-excel-file/m-p/603707#M1105772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/3560"&gt;Tim Benoit&lt;/A&gt; did a couple of excellent blog posts where he showed how Excel macros could be used to interact with the QlikView API to get and set variable values.&amp;nbsp; I recommend searching for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will sometimes run into problems with quotes and $ symbols in your variables values in a spreadsheet - you may find you need to do a SUBSITUTE or two in Excel and the corresponding REPLACE statements in QlikView to switch the problem characters for characters that are not generally used (¬ and ~ are the ones I use).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Apr 2014 15:52:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Variables-using-excel-file/m-p/603707#M1105772</guid>
      <dc:creator>stevedark</dc:creator>
      <dc:date>2014-04-04T15:52:50Z</dc:date>
    </item>
  </channel>
</rss>

