<?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 Calling VBScript/JScript macro from loadscript hangs QV? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calling-VBScript-JScript-macro-from-loadscript-hangs-QV/m-p/224686#M77059</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All!&lt;/P&gt;&lt;P&gt;I've been trying to call the following JScript macro from the load script using a LET statement, but every time I try it hangs QlikView:&lt;/P&gt;&lt;P&gt;[CODE]&lt;/P&gt;&lt;PRE&gt;function exportXML () { var fn= ActiveDocument.GetProperties().MyWorkingDirectory + "\\questions.xml" ; ActiveDocument.GetField("xml") . ServerSideExportEx(fn,".",1,0,false) ; var fo=(new ActiveXObject("Scripting.FileSystemObject")) . GetFile (fn) ; rf=fo . OpenAsTextStream(1,0) ; nt=rf . ReadAll() . replace(/""""/g,""" """) // Change correct "" to " " . replace(/""/g,""") . replace(/" "/g, """") // Change all "" to " then correct " " to "" . replace(/"\&amp;lt;\?/g,"&amp;lt;?") . replace(/ "[\n\r]+/g, "") // Remove record quotations ; rf . Close() ; wf= fo . OpenAsTextStream(2,0) ; wf . Write (nt) ; wf . Close() ; return 0}&lt;/PRE&gt;&lt;P&gt;[/CODE]&lt;/P&gt;&lt;P&gt;When I call the Macro from within the Edit Module dialog it does exactly what I need it to. Why is it hanging when called from the load script?&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 Jan 2010 18:38:03 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-01-27T18:38:03Z</dc:date>
    <item>
      <title>Calling VBScript/JScript macro from loadscript hangs QV?</title>
      <link>https://community.qlik.com/t5/QlikView/Calling-VBScript-JScript-macro-from-loadscript-hangs-QV/m-p/224686#M77059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All!&lt;/P&gt;&lt;P&gt;I've been trying to call the following JScript macro from the load script using a LET statement, but every time I try it hangs QlikView:&lt;/P&gt;&lt;P&gt;[CODE]&lt;/P&gt;&lt;PRE&gt;function exportXML () { var fn= ActiveDocument.GetProperties().MyWorkingDirectory + "\\questions.xml" ; ActiveDocument.GetField("xml") . ServerSideExportEx(fn,".",1,0,false) ; var fo=(new ActiveXObject("Scripting.FileSystemObject")) . GetFile (fn) ; rf=fo . OpenAsTextStream(1,0) ; nt=rf . ReadAll() . replace(/""""/g,""" """) // Change correct "" to " " . replace(/""/g,""") . replace(/" "/g, """") // Change all "" to " then correct " " to "" . replace(/"\&amp;lt;\?/g,"&amp;lt;?") . replace(/ "[\n\r]+/g, "") // Remove record quotations ; rf . Close() ; wf= fo . OpenAsTextStream(2,0) ; wf . Write (nt) ; wf . Close() ; return 0}&lt;/PRE&gt;&lt;P&gt;[/CODE]&lt;/P&gt;&lt;P&gt;When I call the Macro from within the Edit Module dialog it does exactly what I need it to. Why is it hanging when called from the load script?&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;Alex&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Jan 2010 18:38:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calling-VBScript-JScript-macro-from-loadscript-hangs-QV/m-p/224686#M77059</guid>
      <dc:creator />
      <dc:date>2010-01-27T18:38:03Z</dc:date>
    </item>
  </channel>
</rss>

