<?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 Output table to external file with file called today's date in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Output-table-to-external-file-with-file-called-today-s-date/m-p/143365#M22624</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Michael for your replies,&lt;/P&gt;&lt;P&gt;I thought I could do the rest of the coding...&lt;/P&gt;&lt;P&gt;sub test&lt;BR /&gt;set a=ActiveDocument.GetSheetObject("TB01")&lt;BR /&gt;File = ActiveDocument.Evaluate("'fdb' &amp;amp; timestamp(now(), 'YYMMDDhhmm') &amp;amp; '.csv'")&lt;BR /&gt;a.Export (File)&lt;BR /&gt; msgbox(File)&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;But this does not work, nor does a.SaveAs.&lt;/P&gt;&lt;P&gt;Any more help greatly appreciated&lt;/P&gt;&lt;P&gt;Bob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 May 2009 23:08:39 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-05-05T23:08:39Z</dc:date>
    <item>
      <title>Output table to external file with file called today's date</title>
      <link>https://community.qlik.com/t5/QlikView/Output-table-to-external-file-with-file-called-today-s-date/m-p/143363#M22622</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 am trying to get a maco working that will export a table to a file that is named according to date i.e.&lt;/P&gt;&lt;P class="MsoNormalCxSpFirst" style="margin: 0cm 0cm 0pt 39.6pt; mso-add-space: auto;"&gt;The file should be created with the name fdnyymmddhhmm.csv Where&lt;/P&gt;&lt;P class="MsoNormalCxSpMiddle" style="margin: 0cm 0cm 0pt 39.6pt; text-indent: 0cm; mso-add-space: auto; mso-list: none;"&gt;yy = last two digits of the current year&lt;BR /&gt;mm = the current month&lt;BR /&gt;dd = current date with leading zero as appropriate&lt;BR /&gt;hh = current hour in 24 hour format "23" for 11 p.m.&lt;BR /&gt;mm = current minutes with leading zero i.e. "05"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Example filename = fdn0904091410.csv when the file was created at 14:10 on the 9 April&lt;/P&gt;&lt;P&gt;Has anybody had any luck with this before. I have tried for a couple of hours and can't seem to get it right.&lt;/P&gt;&lt;P&gt;Thanks in advance&lt;/P&gt;&lt;P&gt;Bob&lt;BR style="mso-special-character: line-break;" /&gt;&lt;BR style="mso-special-character: line-break;" /&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 21:21:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Output-table-to-external-file-with-file-called-today-s-date/m-p/143363#M22622</guid>
      <dc:creator />
      <dc:date>2009-05-05T21:21:57Z</dc:date>
    </item>
    <item>
      <title>Output table to external file with file called today's date</title>
      <link>https://community.qlik.com/t5/QlikView/Output-table-to-external-file-with-file-called-today-s-date/m-p/143364#M22623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bob,&lt;/P&gt;&lt;P&gt;I think that the easier way is to use QV functionality. You can create variable based on now() function, formated the way you want, something like:&lt;BR /&gt;&lt;STRONG&gt;='fdn' &amp;amp; timestamp(now(), 'YYMMDDhhmm') &amp;amp; '.csv'&lt;/STRONG&gt;&lt;BR /&gt;And use it in your macro as the file name&lt;/P&gt;&lt;P&gt;I forgot about the Evaluate - with it you don't even need macro. Try this:&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;sub test&lt;BR /&gt; File = activedocument.Evaluate("'fdb' &amp;amp; timestamp(now(), 'YYMMDDhhmm') &amp;amp; '.csv'")&lt;BR /&gt; msgbox(File)&lt;BR /&gt;end sub&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;I assume you can do the rest of coding &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 22:41:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Output-table-to-external-file-with-file-called-today-s-date/m-p/143364#M22623</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-05T22:41:59Z</dc:date>
    </item>
    <item>
      <title>Output table to external file with file called today's date</title>
      <link>https://community.qlik.com/t5/QlikView/Output-table-to-external-file-with-file-called-today-s-date/m-p/143365#M22624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Michael for your replies,&lt;/P&gt;&lt;P&gt;I thought I could do the rest of the coding...&lt;/P&gt;&lt;P&gt;sub test&lt;BR /&gt;set a=ActiveDocument.GetSheetObject("TB01")&lt;BR /&gt;File = ActiveDocument.Evaluate("'fdb' &amp;amp; timestamp(now(), 'YYMMDDhhmm') &amp;amp; '.csv'")&lt;BR /&gt;a.Export (File)&lt;BR /&gt; msgbox(File)&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;But this does not work, nor does a.SaveAs.&lt;/P&gt;&lt;P&gt;Any more help greatly appreciated&lt;/P&gt;&lt;P&gt;Bob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 23:08:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Output-table-to-external-file-with-file-called-today-s-date/m-p/143365#M22624</guid>
      <dc:creator />
      <dc:date>2009-05-05T23:08:39Z</dc:date>
    </item>
    <item>
      <title>Output table to external file with file called today's date</title>
      <link>https://community.qlik.com/t5/QlikView/Output-table-to-external-file-with-file-called-today-s-date/m-p/143366#M22625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bob,&lt;BR /&gt;This macro works fine for me:&lt;BR /&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;&lt;BR /&gt;sub test&lt;BR /&gt; set obj = ActiveDocument.GetSheetObject("TB01")&lt;BR /&gt; File = activedocument.Evaluate("'fdb' &amp;amp; timestamp(now(), 'YYMMDDhhmm') &amp;amp; '.csv'")&lt;BR /&gt; obj.Export File, ";"&lt;BR /&gt;end sub&lt;BR /&gt;&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;It creates the file in the same directory with qvw. But you can add the path to the file name in the macro - hardcoded or as a variable. &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 May 2009 23:22:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Output-table-to-external-file-with-file-called-today-s-date/m-p/143366#M22625</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-05-05T23:22:53Z</dc:date>
    </item>
    <item>
      <title>Output table to external file with file called today's date</title>
      <link>https://community.qlik.com/t5/QlikView/Output-table-to-external-file-with-file-called-today-s-date/m-p/143367#M22626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you so much - this worked perfectly &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Bob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 May 2009 15:59:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Output-table-to-external-file-with-file-called-today-s-date/m-p/143367#M22626</guid>
      <dc:creator />
      <dc:date>2009-05-06T15:59:36Z</dc:date>
    </item>
  </channel>
</rss>

