<?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 Export to CSV and Dynamically Add Column Header in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Export-to-CSV-and-Dynamically-Add-Column-Header/m-p/1383747#M421497</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following macro, which outputs a csv file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUB csv_Macro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET sObject = ActiveDocument.GetSheetObject("CH01")&lt;/P&gt;&lt;P&gt;sObject.Export "C:\Users\....\TestFile.csv", ", "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END SUB&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;I was hoping to add additional logic so that I could rename the first two blank columns in row 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if I am outputting a file with five columns, then I want cell D1 to be labeled as "LineItem" and cell E1 to be labeled as "Amount"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly, if the file I am outputting has three columns, then I want cell B1 to be labeled as "LineItem" and cell C1 to be labeled as "Amount"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to coding Macros in QlikView, and while I have gotten the export to work, I would appreciate any help with adding the additional logic above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 10 Aug 2017 19:07:51 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-08-10T19:07:51Z</dc:date>
    <item>
      <title>Export to CSV and Dynamically Add Column Header</title>
      <link>https://community.qlik.com/t5/QlikView/Export-to-CSV-and-Dynamically-Add-Column-Header/m-p/1383747#M421497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the following macro, which outputs a csv file:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUB csv_Macro&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET sObject = ActiveDocument.GetSheetObject("CH01")&lt;/P&gt;&lt;P&gt;sObject.Export "C:\Users\....\TestFile.csv", ", "&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;END SUB&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;I was hoping to add additional logic so that I could rename the first two blank columns in row 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, if I am outputting a file with five columns, then I want cell D1 to be labeled as "LineItem" and cell E1 to be labeled as "Amount"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Similarly, if the file I am outputting has three columns, then I want cell B1 to be labeled as "LineItem" and cell C1 to be labeled as "Amount"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am new to coding Macros in QlikView, and while I have gotten the export to work, I would appreciate any help with adding the additional logic above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 19:07:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-to-CSV-and-Dynamically-Add-Column-Header/m-p/1383747#M421497</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-10T19:07:51Z</dc:date>
    </item>
    <item>
      <title>Re: Export to CSV and Dynamically Add Column Header</title>
      <link>https://community.qlik.com/t5/QlikView/Export-to-CSV-and-Dynamically-Add-Column-Header/m-p/1383748#M421498</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;You dont need to do anything.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When you export the chart it will be exported with labels given.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 19:59:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-to-CSV-and-Dynamically-Add-Column-Header/m-p/1383748#M421498</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2017-08-10T19:59:39Z</dc:date>
    </item>
    <item>
      <title>Re: Export to CSV and Dynamically Add Column Header</title>
      <link>https://community.qlik.com/t5/QlikView/Export-to-CSV-and-Dynamically-Add-Column-Header/m-p/1383749#M421499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the charts that I am exporting, while the number of columns in each chart may be different, the last two columns in every chart do not have headers. I am hoping to build the logic noted above in the QlikView macro, as opposed to maintaining a separate macro in Microsoft Excel. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 20:04:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-to-CSV-and-Dynamically-Add-Column-Header/m-p/1383749#M421499</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-10T20:04:12Z</dc:date>
    </item>
    <item>
      <title>Re: Export to CSV and Dynamically Add Column Header</title>
      <link>https://community.qlik.com/t5/QlikView/Export-to-CSV-and-Dynamically-Add-Column-Header/m-p/1383750#M421500</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;That is what i want to say, why you want to use a macro when you can give a labels in Qlik Chart, So if you manage them properly in chart you dont need a macro to re do the same thing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Kaushik Solanki&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 20:07:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-to-CSV-and-Dynamically-Add-Column-Header/m-p/1383750#M421500</guid>
      <dc:creator>kaushiknsolanki</dc:creator>
      <dc:date>2017-08-10T20:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Export to CSV and Dynamically Add Column Header</title>
      <link>https://community.qlik.com/t5/QlikView/Export-to-CSV-and-Dynamically-Add-Column-Header/m-p/1383751#M421501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;As you can see in the attached image, I have a number of expressions in a single column, and so while I can label each expression individually (assets, liabilities, etc) in the chart "Properties", I need &lt;IMG alt="QV_Output.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/173107_QV_Output.jpg" style="width: 620px; height: 349px;" /&gt;a header for all of my equations.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Aug 2017 20:13:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-to-CSV-and-Dynamically-Add-Column-Header/m-p/1383751#M421501</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-10T20:13:50Z</dc:date>
    </item>
  </channel>
</rss>

