<?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 Macro to export a .csv and zip it in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Macro-to-export-a-csv-and-zip-it/m-p/565323#M683835</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;I have very little knowledge on vb script. I am using the below vb script to export a sheet object to a .csv file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub Export&lt;/P&gt;&lt;P&gt;Dim docProp&lt;/P&gt;&lt;P&gt;set docProp = ActiveDocument.GetProperties&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim tmpFile&amp;nbsp; 'used to create relative filepaths&lt;/P&gt;&lt;P&gt;tmpFile = docProp.MyWorkingDirectory&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim vSpl&amp;nbsp; 'location of final backslash char&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vSpl = InStrRev(tmpFile,"\")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmpFile = Left(tmpFile,vSpl-1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vSpl = InStrRev(tmpFile,"\")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmpFile = Left(tmpFile,vSpl) &amp;amp; "External Data Sources\OperationalReportsOutput\BankruptcyRptSpreadsheet_" &amp;amp; DatePart("YYYY", Now()) &amp;amp; right( "0" &amp;amp; DatePart("m", Now()) ,2) &amp;amp; right( "0" &amp;amp; DatePart("d", Now()) ,2) &amp;amp; ".csv"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set obj = ActiveDocument.GetSheetObject("CH02")&lt;/P&gt;&lt;P&gt;obj.ExportBiff tmpFile&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, the file forming is more than 25mb and it was not getting attached to the mail and am unable to send the email. So, i need the script to create a zip folder and compress the file. How can i do it. Please help me with your suggestion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 10 Feb 2014 19:57:31 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-02-10T19:57:31Z</dc:date>
    <item>
      <title>Macro to export a .csv and zip it</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-export-a-csv-and-zip-it/m-p/565323#M683835</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;I have very little knowledge on vb script. I am using the below vb script to export a sheet object to a .csv file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub Export&lt;/P&gt;&lt;P&gt;Dim docProp&lt;/P&gt;&lt;P&gt;set docProp = ActiveDocument.GetProperties&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim tmpFile&amp;nbsp; 'used to create relative filepaths&lt;/P&gt;&lt;P&gt;tmpFile = docProp.MyWorkingDirectory&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dim vSpl&amp;nbsp; 'location of final backslash char&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vSpl = InStrRev(tmpFile,"\")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmpFile = Left(tmpFile,vSpl-1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vSpl = InStrRev(tmpFile,"\")&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;tmpFile = Left(tmpFile,vSpl) &amp;amp; "External Data Sources\OperationalReportsOutput\BankruptcyRptSpreadsheet_" &amp;amp; DatePart("YYYY", Now()) &amp;amp; right( "0" &amp;amp; DatePart("m", Now()) ,2) &amp;amp; right( "0" &amp;amp; DatePart("d", Now()) ,2) &amp;amp; ".csv"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set obj = ActiveDocument.GetSheetObject("CH02")&lt;/P&gt;&lt;P&gt;obj.ExportBiff tmpFile&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, the file forming is more than 25mb and it was not getting attached to the mail and am unable to send the email. So, i need the script to create a zip folder and compress the file. How can i do it. Please help me with your suggestion.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2014 19:57:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-export-a-csv-and-zip-it/m-p/565323#M683835</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-02-10T19:57:31Z</dc:date>
    </item>
    <item>
      <title>Re: Macro to export a .csv and zip it</title>
      <link>https://community.qlik.com/t5/QlikView/Macro-to-export-a-csv-and-zip-it/m-p/565324#M683836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vamshi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry the ingles bad.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know with macro, but with script I suggest.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;STORE Sample into c:\Temp\Malling.csv (txt, delimiter is ';');&lt;/P&gt;&lt;P&gt;EXECUTE cmd.exe /C c:\WinRAR.exe a -afzip -df c:\Temp\Sample.zip c:\Temp\Malling.csv;&lt;/P&gt;&lt;P&gt;EXECUTE cmd.exe /C del /f/q c:\Temp\Malling.csv;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Bye.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Feb 2014 20:25:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Macro-to-export-a-csv-and-zip-it/m-p/565324#M683836</guid>
      <dc:creator>aderlanrm</dc:creator>
      <dc:date>2014-02-10T20:25:49Z</dc:date>
    </item>
  </channel>
</rss>

