<?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: Create / export   .txt file from button in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Create-export-txt-file-from-button/m-p/1063273#M640193</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jonathan,&lt;/P&gt;&lt;P&gt;finally i've used this macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;sub EXPORT()&lt;BR /&gt; &lt;BR /&gt; dim a&lt;BR /&gt; a = now()&lt;BR /&gt; &lt;BR /&gt; Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;BR /&gt; Set objFile = objFSO.CreateTextFile("C:\Users\marcello.aondio\Desktop\Sorgenia 2\" &amp;amp; "TASK_NOMETASKAA_UTENTEQV_" &amp;amp; left(a,2) &amp;amp; "-" &amp;amp; Right(Left(a, 5), 2) &amp;amp; "-" &amp;amp; Right(Left(a, 10), 4) &amp;amp; "_" &amp;amp;Right(Left(a, 13), 2)&amp;amp; "-" &amp;amp;Right(Left(a, 16), 2)&amp;amp; "-" &amp;amp;Right(Left(a, 19), 2)&amp;amp; ".txt")&lt;BR /&gt; &lt;BR /&gt; end sub &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 19 Feb 2016 08:54:33 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-02-19T08:54:33Z</dc:date>
    <item>
      <title>Create / export   .txt file from button</title>
      <link>https://community.qlik.com/t5/QlikView/Create-export-txt-file-from-button/m-p/1063270#M640190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how can i create an empty .txt file from my dashboard with a button?&lt;/P&gt;&lt;P&gt;I need to create on my desktop an empty .txt file with this naming convention :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri',sans-serif; color: #1f497d;"&gt;XX_YY_GG-MM-AAAA_HH-MM-SS.txt&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri',sans-serif; color: #1f497d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;where GG-MM-AAAA_HH-MM-SS represent the now().&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;Thanks Everybody!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-family: arial,helvetica,sans-serif;"&gt;M&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri',sans-serif; color: #1f497d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri',sans-serif; color: #1f497d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2016 11:37:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-export-txt-file-from-button/m-p/1063270#M640190</guid>
      <dc:creator />
      <dc:date>2016-02-18T11:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: Create / export   .txt file from button</title>
      <link>https://community.qlik.com/t5/QlikView/Create-export-txt-file-from-button/m-p/1063271#M640191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;May be this macro will help...&lt;/P&gt;&lt;P&gt;Create one field without value and use it as a ListBox, (Here the object ID LB01) .&lt;/P&gt;&lt;P&gt;Create one Button, Assign the below Macro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_1455852638167951 jive_text_macro" jivemacro_uid="_1455852638167951"&gt;
&lt;P&gt;sub Test()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set obj = ActiveDocument.GetSheetObject("LB01")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; path=ActiveDocument.Evaluate("=Replace(DocumentPath(),subfield(DocumentPath(),'\',-1),'')")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fname=ActiveDocument.Evaluate("=Timestamp(now(),'DD-MM-YYYYY_hh-mm-ss')")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; obj.Export path&amp;amp;"\XX_YY_"&amp;amp;fname&amp;amp;".txt",","&lt;/P&gt;
&lt;P&gt;end sub&lt;/P&gt;


&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or, You can create two variables, and use it in your macro.. Like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14558541862933660 jive_text_macro" jivemacro_uid="_14558541862933660" modifiedtitle="true"&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;sub Test_1()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set obj = ActiveDocument.GetSheetObject("LB01")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set path=ActiveDocument.GetVariable("vPath")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set fname=ActiveDocument.GetVariable("vFile")&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; filename=path.getcontent.string&amp;amp;"XX_YY"&amp;amp;fname.getcontent.string&amp;amp;".txt"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; obj.Export filename,","&lt;/P&gt;
&lt;P&gt;end sub&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check the Attachment..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2016 03:32:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-export-txt-file-from-button/m-p/1063271#M640191</guid>
      <dc:creator>settu_periasamy</dc:creator>
      <dc:date>2016-02-19T03:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Create / export   .txt file from button</title>
      <link>https://community.qlik.com/t5/QlikView/Create-export-txt-file-from-button/m-p/1063272#M640192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't need to export a dummy object, rather use the vbscript fso api:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;fname = "\XX_YY_" &amp;amp; ActiveDocument.Evaluate("=Timestamp(now(),'DD-MM-YYYYY_hh-mm-ss')") &amp;amp; ".txt"&lt;/P&gt;&lt;P&gt;Set filesys = CreateObject("Scripting.FileSystemObject") &lt;/P&gt;&lt;P&gt;Set filetxt = filesys.CreateTextFile(fname, True) &lt;/P&gt;&lt;P&gt;filetxt.Close &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2016 05:05:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-export-txt-file-from-button/m-p/1063272#M640192</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2016-02-19T05:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Create / export   .txt file from button</title>
      <link>https://community.qlik.com/t5/QlikView/Create-export-txt-file-from-button/m-p/1063273#M640193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Jonathan,&lt;/P&gt;&lt;P&gt;finally i've used this macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN lang="EN-US" style="font-size: 9.0pt; font-family: 'Courier New'; color: black;"&gt;sub EXPORT()&lt;BR /&gt; &lt;BR /&gt; dim a&lt;BR /&gt; a = now()&lt;BR /&gt; &lt;BR /&gt; Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;BR /&gt; Set objFile = objFSO.CreateTextFile("C:\Users\marcello.aondio\Desktop\Sorgenia 2\" &amp;amp; "TASK_NOMETASKAA_UTENTEQV_" &amp;amp; left(a,2) &amp;amp; "-" &amp;amp; Right(Left(a, 5), 2) &amp;amp; "-" &amp;amp; Right(Left(a, 10), 4) &amp;amp; "_" &amp;amp;Right(Left(a, 13), 2)&amp;amp; "-" &amp;amp;Right(Left(a, 16), 2)&amp;amp; "-" &amp;amp;Right(Left(a, 19), 2)&amp;amp; ".txt")&lt;BR /&gt; &lt;BR /&gt; end sub &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2016 08:54:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Create-export-txt-file-from-button/m-p/1063273#M640193</guid>
      <dc:creator />
      <dc:date>2016-02-19T08:54:33Z</dc:date>
    </item>
  </channel>
</rss>

