<?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 create TXT file from variable? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915292#M317514</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was replying to 1st option - "MyTable and STORE". I dont want the header in txt file. I need only value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 2nd oprtion - execute is not good for thie solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 07 Aug 2015 14:24:42 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-08-07T14:24:42Z</dc:date>
    <item>
      <title>How to create TXT file from variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915288#M317510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;my client would like to create TXT file from QlikView with number 0 or 1 (depends on if condition). I was searching for some solution, but I found nothing.&lt;/P&gt;&lt;P&gt;Is it possible to create only file with one of these numbers?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this - but I think it is not good:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vNotification_file#1=if( if( InWeek(Today(),date(if( $(vActualDate)&amp;lt;= $(vActualDate2), vActualDate2, vActualDate)),0),&lt;/P&gt;&lt;P&gt;date(date(if( $(vActualDate)&amp;lt;= $(vActualDate2), vActualDate2, vActualDate)))=today(),&lt;/P&gt;&lt;P&gt;&amp;nbsp; date(date(if( $(vActualDate)&amp;lt;= $(vActualDate2), vActualDate2, vActualDate))+2)=today()),&lt;/P&gt;&lt;P&gt;'0 ','1 ');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- then I manually created empty TXT file&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tab1:&lt;/P&gt;&lt;P&gt;LOAD @1 as not1,&lt;/P&gt;&lt;P&gt;$(vNotification_file#1) &lt;/P&gt;&lt;P&gt;from &lt;/P&gt;&lt;P&gt;$(vPathDATA)not.txt&lt;/P&gt;&lt;P&gt;(txt, codepage is 1250, no labels, delimiter is '\t', msq);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tab2:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;$(vNotification_file#1) &lt;/P&gt;&lt;P&gt;Resident Tab1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Store Tab2 into $(vPathDATA)Notification_file#1.txt(txt);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This gives me number 1 in TXT file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks.&lt;/P&gt;&lt;P&gt;Maros&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 10:32:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915288#M317510</guid>
      <dc:creator />
      <dc:date>2015-08-07T10:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to create TXT file from variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915289#M317511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;MyTable:&lt;/P&gt;&lt;P&gt;LOAD &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(vNotification_file#1) as FieldNameHere&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Autogenerate 1;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE MyTable into MyFile.txt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But perhaps this is easier: execute cmd.exe /c echo &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;$(vNotification_file#1) &amp;gt; myfile.txt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 13:58:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915289#M317511</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-08-07T13:58:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to create TXT file from variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915290#M317512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this before - bud it gives me this output:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;FieldNameHere&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i need is only this output:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 14:06:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915290#M317512</guid>
      <dc:creator />
      <dc:date>2015-08-07T14:06:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to create TXT file from variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915291#M317513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Then use the second option I posted. Saving a table in a text file with the STORE command always (yes, really, really always, no exceptions, I ain't kidding) with a header row that contains the field names.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 14:08:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915291#M317513</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2015-08-07T14:08:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to create TXT file from variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915292#M317514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was replying to 1st option - "MyTable and STORE". I dont want the header in txt file. I need only value. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 2nd oprtion - execute is not good for thie solution.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 14:24:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915292#M317514</guid>
      <dc:creator />
      <dc:date>2015-08-07T14:24:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to create TXT file from variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915293#M317515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why not the second option?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Aug 2015 14:34:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915293#M317515</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-08-07T14:34:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to create TXT file from variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915294#M317516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried it with execution, it works. Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 23 Aug 2015 21:55:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915294#M317516</guid>
      <dc:creator />
      <dc:date>2015-08-23T21:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to create TXT file from variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915295#M317517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How would you do this to a specific location using a variable?&amp;nbsp; I tried the below and it ran but did not produce the file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vDataPath = '\\file path\';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;execute cmd.exe /c echo &amp;gt; $(vDataPath)BAR_FILE_IND_TEST.txt (txt); &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2018 20:29:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915295#M317517</guid>
      <dc:creator>carlcimino</dc:creator>
      <dc:date>2018-10-22T20:29:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to create TXT file from variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915296#M317518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's always been an item on the wishlist, to be able to have STORE write (txt) verbatim to disk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another tricky issue was when contents of the data contained characters like double-quotes, output rows were automatically wrapped with exterior and escaped quotes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It would be neat to have a pure verbatim STORE option, making it possible to read or form lines of code in script, and&amp;nbsp; output a new valid programmatic file. &lt;EM&gt;(Imagine loading, tagging, &amp;amp; re-sequencing XML files or something.&amp;nbsp; course hope this wouldn't get abused)&lt;BR /&gt;&lt;/EM&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I upvoted this in IDEA forum &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;A __default_attr="3541" __jive_macro_name="idea" class="jive_macro jive_macro_idea" data-orig-content="STORE &amp;quot;no quotes&amp;quot; and &amp;quot;no header&amp;quot; format-spec options" href="https://community.qlik.com/"&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2018 20:42:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915296#M317518</guid>
      <dc:creator>evan_kurowski</dc:creator>
      <dc:date>2018-10-22T20:42:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to create TXT file from variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915297#M317519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are several issues. Your path contains spaces and needs therefore quotes to be valid. Further you don't use Qlik to store data else you used it to execute the windows command-line to do it (by "abusing" their logging-feature respectively call it a workaround). This means you need to specify also a content and the file musn't have a fileformat entry esle just an extension. This means your code should more look like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vDataPath = '\\file path\';&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;execute cmd.exe /c echo $(&lt;STRONG&gt;YourFileContent&lt;/STRONG&gt;) &amp;gt; &lt;STRONG&gt;"&lt;/STRONG&gt;$(vDataPath)BAR_FILE_IND_TEST.txt&lt;STRONG&gt;"&lt;/STRONG&gt;; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2018 05:16:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915297#M317519</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2018-10-23T05:16:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to create TXT file from variable?</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915298#M317520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Marcus. I have it working now. The main problem was the lack of quotes!&amp;nbsp; So silly of me.&amp;nbsp; Appreciate your reminding me of that detail.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;execute cmd.exe /c echo. &amp;gt; "$(vDataPath)BAR_FILE_IND.txt";&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 26 Oct 2018 15:55:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-create-TXT-file-from-variable/m-p/915298#M317520</guid>
      <dc:creator>carlcimino</dc:creator>
      <dc:date>2018-10-26T15:55:08Z</dc:date>
    </item>
  </channel>
</rss>

