<?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: Using a macro to write to csv file in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-a-macro-to-write-to-csv-file/m-p/296961#M110167</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunil, but its variables I want to write out rather than a sheet object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ive found a solution now: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Const ForAppending = 8 'Setting to append to end of csv file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set fs = CreateObject("Scripting.FileSystemObject")&lt;BR /&gt;Set f = fs.OpenTextFile(f_name,ForAppending,TristateFalse)&lt;BR /&gt;f.WriteLine VB_WRITESTRING&lt;BR /&gt;f.Close&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems to work on desktop client, hoping it will work on accesspoint as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Aug 2011 13:14:39 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-08-24T13:14:39Z</dc:date>
    <item>
      <title>Using a macro to write to csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-macro-to-write-to-csv-file/m-p/296958#M110164</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;&lt;/P&gt;&lt;P&gt;I want to write a macro to write a string out to a csv file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ive been looking on the internet and can't find an example of the code needed that works in qlikview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can get the string formated correctly in the macro, and I can get it to pop up in a message box, but I can't figure out how to simply write this string out to an externally located csv file. I want to simply append the string onto the end of the csv file (i.e on the next line) each time I run the macro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Dan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 12:24:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-macro-to-write-to-csv-file/m-p/296958#M110164</guid>
      <dc:creator />
      <dc:date>2011-08-24T12:24:36Z</dc:date>
    </item>
    <item>
      <title>Using a macro to write to csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-macro-to-write-to-csv-file/m-p/296959#M110165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; call following code on button click&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub sendtocsv &lt;/P&gt;&lt;P&gt;set&lt;/P&gt;&lt;P&gt;obj1 = ActiveDocument.GetSheetObject("CH1926") &lt;/P&gt;&lt;P&gt;obj1.Export "D:\Qlik2Finance\Work\SUNIL\Debtor_Booksize_daily_export\BOOKSIZE.csv"&lt;/P&gt;&lt;P&gt;,"," &lt;/P&gt;&lt;P&gt;end&lt;/P&gt;&lt;P&gt;sub &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inplace of CH1926 of give ur chartID&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;inplace of "D:\Qlik2Finance\Work\SUNIL\Debtor_Booksize_daily_export\BOOKSIZE.csv" give ur path&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 12:31:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-macro-to-write-to-csv-file/m-p/296959#M110165</guid>
      <dc:creator>SunilChauhan</dc:creator>
      <dc:date>2011-08-24T12:31:25Z</dc:date>
    </item>
    <item>
      <title>Using a macro to write to csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-macro-to-write-to-csv-file/m-p/296960#M110166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunil, but its variables I want to write out rather than a sheet object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ive found a solution now: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Const ForAppending = 8 'Setting to append to end of csv file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set fs = CreateObject("Scripting.FileSystemObject")&lt;BR /&gt;Set f = fs.OpenTextFile(f_name,ForAppending,TristateFalse)&lt;BR /&gt;f.WriteLine VB_WRITESTRING&lt;BR /&gt;f.Close&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems to work on desktop client, hoping it will work on accesspoint as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 13:13:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-macro-to-write-to-csv-file/m-p/296960#M110166</guid>
      <dc:creator />
      <dc:date>2011-08-24T13:13:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using a macro to write to csv file</title>
      <link>https://community.qlik.com/t5/QlikView/Using-a-macro-to-write-to-csv-file/m-p/296961#M110167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sunil, but its variables I want to write out rather than a sheet object.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ive found a solution now: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Const ForAppending = 8 'Setting to append to end of csv file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set fs = CreateObject("Scripting.FileSystemObject")&lt;BR /&gt;Set f = fs.OpenTextFile(f_name,ForAppending,TristateFalse)&lt;BR /&gt;f.WriteLine VB_WRITESTRING&lt;BR /&gt;f.Close&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems to work on desktop client, hoping it will work on accesspoint as well.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Aug 2011 13:14:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-a-macro-to-write-to-csv-file/m-p/296961#M110167</guid>
      <dc:creator />
      <dc:date>2011-08-24T13:14:39Z</dc:date>
    </item>
  </channel>
</rss>

