<?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: Export To Excel Macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Export-To-Excel-Macro/m-p/982615#M645607</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;I have somes example, so you can try these to meet the format to your &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;preformatted Excel document&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curSheet.Columns("A").ColumnWidth=5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curSheet.Columns("B:E").ColumnWidth=15&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curSheet.Columns("F").ColumnWidth=40&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curSheet.Columns("I:J").NumberFormatLocal = "# ##0,00"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Nov 2015 12:53:05 GMT</pubDate>
    <dc:creator>syukyo_zhu</dc:creator>
    <dc:date>2015-11-12T12:53:05Z</dc:date>
    <item>
      <title>Export To Excel Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Export-To-Excel-Macro/m-p/982613#M645605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi at the moment I don't have access to NPrinting, so have a little bit of code that loops through a data set, copies the data from a table, and pastes it into a preformatted Excel document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Everything is working well, but I'd like to add some additional polish to the code.&amp;nbsp; The code to paste the data in is :&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;EM&gt; ActiveDocument.GetSheetObject("CH93").CopyTableToClipboard true&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; set XLSheet = XLDOC.Worksheets("Open Orders")&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; XLSheet.Paste XLSheet.Range("A16") &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However I'd like to paste values only, rather than carry over the source formatting, how can I get this working, previous attempts have just failed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another failing in the code, which uses all available data in a listbox, rotating through each one in turn, is that it will also choose an account that has no open lines.&amp;nbsp; I created a variable counting the number of lines based on the list box selection and added an if statement in to say if the count was 0 just end, but the code wouldn't work, what could I be missing?&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 08:54:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-To-Excel-Macro/m-p/982613#M645605</guid>
      <dc:creator>dmac1971</dc:creator>
      <dc:date>2015-11-12T08:54:18Z</dc:date>
    </item>
    <item>
      <title>Re: Export To Excel Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Export-To-Excel-Macro/m-p/982614#M645606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To paste not everything else then certain aspects like values, formattings and so on you will need PasteSpecial: &lt;A href="https://msdn.microsoft.com/de-de/library/office/ff839476.aspx" title="https://msdn.microsoft.com/de-de/library/office/ff839476.aspx"&gt;https://msdn.microsoft.com/de-de/library/office/ff839476.aspx&lt;/A&gt; but this worked mostly only inside from a single excel-instance and not per clipboard. This meant you will need to paste the table somewhere temporary and copy it again to be able to use these PasteSpecial functionalities.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Another possibility (especially needed if the layout-requirements are more expensive) is similar to your approach with a predefined layout only that these areas and sheets pull the data per any lookup-functions from a (hidden) data-sheet in which you the table pasted (after cleaning those from the previous one).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your listbox through which your routine runs (it mustn't be the same which the user used withinthe sheet) should not contain a field else an expression like: if(condition, field) eventually wrapped in an aggr-function if the condition contained aggregation-functions like sum or count - an alternatively for this might be to use chart-table to apply complex-conditions and run through them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 12:45:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-To-Excel-Macro/m-p/982614#M645606</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2015-11-12T12:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: Export To Excel Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Export-To-Excel-Macro/m-p/982615#M645607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;I have somes example, so you can try these to meet the format to your &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;preformatted Excel document&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curSheet.Columns("A").ColumnWidth=5&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curSheet.Columns("B:E").ColumnWidth=15&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curSheet.Columns("F").ColumnWidth=40&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; curSheet.Columns("I:J").NumberFormatLocal = "# ##0,00"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Nov 2015 12:53:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Export-To-Excel-Macro/m-p/982615#M645607</guid>
      <dc:creator>syukyo_zhu</dc:creator>
      <dc:date>2015-11-12T12:53:05Z</dc:date>
    </item>
  </channel>
</rss>

