<?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: Load data in the script with a macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313993#M708453</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the delay. I work on this subject evening at home, and a bit during the lunch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The global variables works, true. But it's VERY difficult to do VB under qlikview (switch between Script and Module, no debug, unexpected and random behavior in the call of subs and functions).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Moreover I have got an amazing issue about global variables "locked" that were randomly unavailable in 1 load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, I have 4 solutions:&lt;/P&gt;&lt;P&gt;- the file created by unsafe macro&lt;/P&gt;&lt;P&gt;- the file created by external batch&lt;/P&gt;&lt;P&gt;- the rows concatenated and splitted by subfield&lt;/P&gt;&lt;P&gt;- use of global Array in VB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot, I can close this thread&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Jan 2012 14:08:11 GMT</pubDate>
    <dc:creator>nstefaniuk</dc:creator>
    <dc:date>2012-01-03T14:08:11Z</dc:date>
    <item>
      <title>Load data in the script with a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313983#M708443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am searching for a way to load data from a macro in the script, without using a temporay file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a macro that extracts data from a specific source, unreachable by the standard connectors. The data is stored in a csv file created on the fly. Then I can read the csv file with the standard script.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am searching for a direct way to add the data in a Qlikview table with the macro, to avoid the temporary csv file. I could loop on data and create an INLINE line for each row, but it would be ugly and I fear that the perfomance would be low.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help on this issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 09:27:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313983#M708443</guid>
      <dc:creator>nstefaniuk</dc:creator>
      <dc:date>2011-12-20T09:27:42Z</dc:date>
    </item>
    <item>
      <title>Load data in the script with a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313984#M708444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's been a while since I've done this, but if I remember correctly you can create macros directly in the script. The syntax is something like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUB mySub&lt;/P&gt;&lt;P&gt;(code here)&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;CALL mySub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that there are no semicolons here. Within the sub it's just regular VBS syntax. If this doesn't work for you, you can also try creating a standard .vbs file to create your CSV and then trigger your QVW reload on completion of the .vbs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vlad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 15:38:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313984#M708444</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2011-12-20T15:38:12Z</dc:date>
    </item>
    <item>
      <title>Load data in the script with a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313985#M708445</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I know it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my question is : how, in the macro, add lines in a QV table on the fly? For example if my macro do a loop on the month number (12 today) and I want that my macro create 12 lines with "Hello World &amp;lt;monthname&amp;gt;" and I want these 12 lines to be added directly in a QV table, without writing a temporary text file or an INLINE, how could I do that ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 16:22:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313985#M708445</guid>
      <dc:creator>nstefaniuk</dc:creator>
      <dc:date>2011-12-20T16:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Load data in the script with a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313986#M708446</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;See attached for a very simplified example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Vlad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 16:59:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313986#M708446</guid>
      <dc:creator>vgutkovsky</dc:creator>
      <dc:date>2011-12-20T16:59:43Z</dc:date>
    </item>
    <item>
      <title>Re: Load data in the script with a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313987#M708447</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Assuming you have to fetch the data in the module code, here's how I do it. Pick a delimiter for your rows that won't appear in your data. Create a module function that returns your rows as a single string with the delimiter between rows. Like this for your example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;Function MakeSomeLines (count)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ret = ""&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; For i = 1 to count&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ret = ret &amp;amp; "Hello World " &amp;amp; cstr(i) &amp;amp; ";"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MakeSomeLines = Left(ret, Len(ret)-1)&amp;nbsp; ' Drop trailing semicolon&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;End Function&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your LOAD statement, call the function with any necessary parms. Split into rows using substring:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;MyTab:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD subfield(MakeSomeLines(month(today(1))), ';') as Hello&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;AutoGenerate 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BTW, if your data already has newline chars then the delimiter and subfield parm is chr(10)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(I'm aware that the above can be done in script, but the example matches the poster's question).&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robwunderlich.com"&gt;http://robwunderlich.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Dec 2011 17:23:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313987#M708447</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2011-12-20T17:23:09Z</dc:date>
    </item>
    <item>
      <title>Re: Load data in the script with a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313988#M708448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Vlad but in your case, the number of lines is defined in the script, when the number of lines in my case if given by the result of the macro. It means that the macro can retrieve me 1 or 1000 lines and I need to add these lines in a Qlikview table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Very interesting method Rob, I understand that &lt;STRONG&gt;subfield&lt;/STRONG&gt; is a way to generate more than 1 line in a table with only 1 line in the source. Very very interesting. Unfortunately, it means that if I have 10 000 lines to add, my macro should retrieve the data of the 10 000 lines concatenated in 1 string, and I fear that I can reach a limit.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact I search to append data in qlikview table in VB script. Something like &lt;STRONG&gt;ActiveDocument.Table.AppendData(bla...)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe I could Create a chart on the fly, then read it and store in a table ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;DIV class="mcePaste" id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow: hidden;"&gt;&lt;A name="subfield"&gt;subfield&lt;/A&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Dec 2011 09:44:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313988#M708448</guid>
      <dc:creator>nstefaniuk</dc:creator>
      <dc:date>2011-12-22T09:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Load data in the script with a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313989#M708449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can't manipulate ActiveDocument during load, but you can after the load. Perhaps even in the OnPostReload event. You could use the dynamic update feature -- Document.DynamicUpdateCommand -- to add data. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Easy to do in Desktop, some obstacles in the server. I believe you can use dynamic update in QV Developer without restriction. To use it in the server requires licensing an additional feature. Also, OnPostReload in the server cannot run macros if you chose to implement this with OnPostReload.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://robwunderlich.com"&gt;http://robwunderlich.com&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Dec 2011 01:33:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313989#M708449</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2011-12-28T01:33:54Z</dc:date>
    </item>
    <item>
      <title>Load data in the script with a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313990#M708450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hmmm ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So here are my cases/tests:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- On load, call a function that retrieves all data and stores in a text file&lt;/P&gt;&lt;P&gt;- Still on load, read the file&lt;/P&gt;&lt;P&gt;=&amp;gt; issue : &lt;STRONG&gt;unsafe macro&lt;/STRONG&gt; must be &lt;STRONG&gt;enable&lt;/STRONG&gt; on server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- On load, call a function that retrieves all data concatenated in a string, then split with Qlikview function subfield&lt;/P&gt;&lt;P&gt;=&amp;gt; issue : dangerous if there is &lt;STRONG&gt;too much&lt;/STRONG&gt; lines, the string would be like a CLOB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- On load, call a function that stores data in an VB array&lt;/P&gt;&lt;P&gt;- Still on load, loop on the array (with VB functions) to read content&lt;/P&gt;&lt;P&gt;=&amp;gt; issue : a VB variable &lt;STRONG&gt;can't survive&lt;/STRONG&gt; to a call, and so can't be used to store data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- On load, call a function that stores data in numerous Qlikview variables, created and filled on the fly&lt;/P&gt;&lt;P&gt;- Still on load, loop on the variables (with autogenerate) to read content&lt;/P&gt;&lt;P&gt;=&amp;gt; issue : a Qlikview variable can't be created in the load because &lt;STRONG&gt;ActiveDocument does not exist&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- On open, call a function that stores data in numerous Qlikview variables, created and filled on the fly&lt;/P&gt;&lt;P&gt;- On load, loop on the variables (with autogenerate) to read content&lt;/P&gt;&lt;P&gt;=&amp;gt; issue : seems that macro can't be called on &lt;STRONG&gt;OnOpen&lt;/STRONG&gt; on server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- On open, call a function that stores data in Qlikview tables with DynamicUpdate.&lt;/P&gt;&lt;P&gt;- On load, loop on the tables&lt;/P&gt;&lt;P&gt;=&amp;gt; issue : DynamicUpdate needs &lt;STRONG&gt;a license&lt;/STRONG&gt; on server&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- On load, call a function that retrieves the data 1 time and count the results&lt;/P&gt;&lt;P&gt;- Still on load, loop on the count and call a function that retrieves each line&lt;/P&gt;&lt;P&gt;=&amp;gt; issue : as we can't store the data with VB script, the macro will be send 1 time to count + 1 time for each line to retrieve. If the macro is long to run and there are a lot of lines, the execution will be &lt;STRONG&gt;very long&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, it seems that I have no solution. Maybe some other ideas? Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Dec 2011 10:24:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313990#M708450</guid>
      <dc:creator>nstefaniuk</dc:creator>
      <dc:date>2011-12-30T10:24:24Z</dc:date>
    </item>
    <item>
      <title>Re: Load data in the script with a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313991#M708451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;gt;So here are my cases/tests:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;- On load, call a function that retrieves all data and stores in a text file&lt;/P&gt;&lt;P&gt;&amp;gt;- Still on load, read the file&lt;/P&gt;&lt;P&gt;&amp;gt;=&amp;gt; issue : unsafe macro must be enable on server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"Unsafe macro" setting on server sounds scary, but it's not really. I would guess that something close to half the installations have this set on. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;- On load, call a function that retrieves all data concatenated in a string, then split with Qlikview function subfield&lt;/P&gt;&lt;P&gt;&amp;gt;=&amp;gt; issue : dangerous if there is too much lines, the string would be like a CLOB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have you tested this? I regularly use this technique to retrieve thousands of lines with no problem. I just ran a quick test and extracted 20k lines from a 1MB+ string with no problem. Worst case, you can make multiple calls to your datasource for something like 1000 lines each -- if your datasource supports chunking like that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;gt;- On load, call a function that stores data in an VB array&lt;/P&gt;&lt;P&gt;&amp;gt;- Still on load, loop on the array (with VB functions) to read content&lt;/P&gt;&lt;P&gt;&amp;gt;=&amp;gt; issue : a VB variable can't survive to a call, and so can't be used to store data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The macro module can use global variables and code (anythng defined outside a Sub or Function). Those global vars will survive between calls. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Global&amp;nbsp; code will be executed the first time the macro module is used -- eg when a function is called from the script. Global code will also be executed when the macro editor is opened. It's a bit tricky to play with this in development. Best to close and reopen the doc when doing final testing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another possibility is to build the csv file in a seperate batch process before the reload. If you have Publisher, this can be scheduled as an external task that runs before the reload. You could also run this process with a script EXECUTE statement but you would have to allow EXECUTE in the script settings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Dec 2011 22:49:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313991#M708451</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2011-12-30T22:49:39Z</dc:date>
    </item>
    <item>
      <title>Load data in the script with a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313992#M708452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Rob.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In fact the "issues" I have given are constraints from administrators (no unsafe macros) or architecture (don't do a concatenate / split of data that could, even if it's rare corrupt or lost data).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For my personnal use I would have used the text file with unsafe macro or your technic with subfield. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try the use of global variables, but I have already tried without result. Maybe I have badly tested it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your last solution is probably the good one, I think we will do that, because this solution is accepted by Administrators AND architecture.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Jan 2012 12:32:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313992#M708452</guid>
      <dc:creator>nstefaniuk</dc:creator>
      <dc:date>2012-01-02T12:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Load data in the script with a macro</title>
      <link>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313993#M708453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rob,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry for the delay. I work on this subject evening at home, and a bit during the lunch.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The global variables works, true. But it's VERY difficult to do VB under qlikview (switch between Script and Module, no debug, unexpected and random behavior in the call of subs and functions).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Moreover I have got an amazing issue about global variables "locked" that were randomly unavailable in 1 load.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, I have 4 solutions:&lt;/P&gt;&lt;P&gt;- the file created by unsafe macro&lt;/P&gt;&lt;P&gt;- the file created by external batch&lt;/P&gt;&lt;P&gt;- the rows concatenated and splitted by subfield&lt;/P&gt;&lt;P&gt;- use of global Array in VB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot, I can close this thread&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 14:08:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Load-data-in-the-script-with-a-macro/m-p/313993#M708453</guid>
      <dc:creator>nstefaniuk</dc:creator>
      <dc:date>2012-01-03T14:08:11Z</dc:date>
    </item>
  </channel>
</rss>

