<?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 Writting a table to a text file in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Writting-a-table-to-a-text-file/m-p/372605#M138540</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to write an input table to a text file.&amp;nbsp; I have a button on a document that has a vbscript that should do this.&amp;nbsp; However when I click on the button I get an access denied error. I am logged in as myself and am an admin on the machine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Activedocument.ClearAll&lt;/P&gt;&lt;P&gt;vDirectory ="..\Config"&lt;/P&gt;&lt;P&gt;' Create the File System Object&lt;BR /&gt;Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;BR /&gt;vFile = "..\Config\Years.txt"&lt;/P&gt;&lt;P&gt;'Either use or create a directory pending on whether it exists&lt;BR /&gt;On Error Resume Next&lt;BR /&gt;If objFSO.FolderExists(vDirectory) Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objFolder = objFSO.GetFolder(vDirectory)&lt;BR /&gt;Else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objFolder = objFSO.CreateFolder(vDirectory)&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;set obj = ActiveDocument.GetSheetObject("Years")&lt;/P&gt;&lt;P&gt;' Export Current object&amp;nbsp; to file&lt;BR /&gt;obj.Export vFile,","&lt;BR /&gt;If Err.Number &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox( "Error Saving Years -- Description: " &amp;amp;&amp;nbsp; Err.Description)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit sub&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Err.Clear&lt;BR /&gt;End If&lt;BR /&gt;On Error Goto 0&lt;BR /&gt;set obj = Nothing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any assistance would be much appriciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jul 2012 20:18:15 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-07-27T20:18:15Z</dc:date>
    <item>
      <title>Writting a table to a text file</title>
      <link>https://community.qlik.com/t5/QlikView/Writting-a-table-to-a-text-file/m-p/372605#M138540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I need to write an input table to a text file.&amp;nbsp; I have a button on a document that has a vbscript that should do this.&amp;nbsp; However when I click on the button I get an access denied error. I am logged in as myself and am an admin on the machine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Activedocument.ClearAll&lt;/P&gt;&lt;P&gt;vDirectory ="..\Config"&lt;/P&gt;&lt;P&gt;' Create the File System Object&lt;BR /&gt;Set objFSO = CreateObject("Scripting.FileSystemObject")&lt;BR /&gt;vFile = "..\Config\Years.txt"&lt;/P&gt;&lt;P&gt;'Either use or create a directory pending on whether it exists&lt;BR /&gt;On Error Resume Next&lt;BR /&gt;If objFSO.FolderExists(vDirectory) Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objFolder = objFSO.GetFolder(vDirectory)&lt;BR /&gt;Else&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set objFolder = objFSO.CreateFolder(vDirectory)&lt;BR /&gt;End If&lt;/P&gt;&lt;P&gt;set obj = ActiveDocument.GetSheetObject("Years")&lt;/P&gt;&lt;P&gt;' Export Current object&amp;nbsp; to file&lt;BR /&gt;obj.Export vFile,","&lt;BR /&gt;If Err.Number &amp;lt;&amp;gt; 0 Then&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox( "Error Saving Years -- Description: " &amp;amp;&amp;nbsp; Err.Description)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit sub&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Err.Clear&lt;BR /&gt;End If&lt;BR /&gt;On Error Goto 0&lt;BR /&gt;set obj = Nothing&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any assistance would be much appriciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2012 20:18:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Writting-a-table-to-a-text-file/m-p/372605#M138540</guid>
      <dc:creator />
      <dc:date>2012-07-27T20:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Writting a table to a text file</title>
      <link>https://community.qlik.com/t5/QlikView/Writting-a-table-to-a-text-file/m-p/372606#M138541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Press Ctrl+M&lt;/P&gt;&lt;P&gt;Change the options &lt;/P&gt;&lt;P&gt;Requested module Security - System Access&lt;/P&gt;&lt;P&gt;Current Local Security - System Access&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2012 20:30:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Writting-a-table-to-a-text-file/m-p/372606#M138541</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-07-27T20:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: Writting a table to a text file</title>
      <link>https://community.qlik.com/t5/QlikView/Writting-a-table-to-a-text-file/m-p/372607#M138542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exit sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Where you open it? Why you used in if condition?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2012 20:32:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Writting-a-table-to-a-text-file/m-p/372607#M138542</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-07-27T20:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Writting a table to a text file</title>
      <link>https://community.qlik.com/t5/QlikView/Writting-a-table-to-a-text-file/m-p/372608#M138543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If the directory or file does not exist then the code should create it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2012 20:37:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Writting-a-table-to-a-text-file/m-p/372608#M138543</guid>
      <dc:creator />
      <dc:date>2012-07-27T20:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Writting a table to a text file</title>
      <link>https://community.qlik.com/t5/QlikView/Writting-a-table-to-a-text-file/m-p/372609#M138544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did that already.&amp;nbsp; no luck..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2012 20:38:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Writting-a-table-to-a-text-file/m-p/372609#M138544</guid>
      <dc:creator />
      <dc:date>2012-07-27T20:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: Writting a table to a text file</title>
      <link>https://community.qlik.com/t5/QlikView/Writting-a-table-to-a-text-file/m-p/372610#M138545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hmm..&amp;nbsp; seems to be related to the relative path I'm using.&amp;nbsp; If I change the relative paths to full path name.&amp;nbsp; It seems to work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 11:06:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Writting-a-table-to-a-text-file/m-p/372610#M138545</guid>
      <dc:creator />
      <dc:date>2012-07-31T11:06:23Z</dc:date>
    </item>
  </channel>
</rss>

