<?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 QV subtotals in Excel in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/QV-subtotals-in-Excel/m-p/436452#M162786</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I'm trying to add subtotals to exported excel file.&lt;/P&gt;&lt;P&gt;Basically I have a excel file on my drive and I'm trying to add subtotals but with no luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Set oXL=CreateObject("Excel.Application")&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;P&gt;f_name="C:\test\test.xls"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oWB=oXL.Workbooks.Open(f_name)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oXL.Visible = True&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oXL.Range("A1:Q156").Select&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oXL.Selection.Subtotal 1, xlCount, Array( 2, 3 ), False, False, False&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get an error "Subtotal method of Range class failed"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I copy &lt;/P&gt;&lt;P&gt;Selection.Subtotal 1, xlCount, Array( 2, 3 ), False, False, False&lt;/P&gt;&lt;P&gt;straight to excel and execute it all goes well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried &lt;/P&gt;&lt;P&gt;set WW = oXL.Selection.Subtotal(1, xlCount, Array( 2, 3 ), False, False, False)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;..then I tried with only 3 parameters, nothing works on QV project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why is that and how to solve it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Mar 2013 13:13:12 GMT</pubDate>
    <dc:creator>edvapran</dc:creator>
    <dc:date>2013-03-13T13:13:12Z</dc:date>
    <item>
      <title>QV subtotals in Excel</title>
      <link>https://community.qlik.com/t5/QlikView/QV-subtotals-in-Excel/m-p/436452#M162786</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;I'm trying to add subtotals to exported excel file.&lt;/P&gt;&lt;P&gt;Basically I have a excel file on my drive and I'm trying to add subtotals but with no luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Set oXL=CreateObject("Excel.Application")&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;P&gt;f_name="C:\test\test.xls"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Set oWB=oXL.Workbooks.Open(f_name)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oXL.Visible = True&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oXL.Range("A1:Q156").Select&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oXL.Selection.Subtotal 1, xlCount, Array( 2, 3 ), False, False, False&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I get an error "Subtotal method of Range class failed"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But when I copy &lt;/P&gt;&lt;P&gt;Selection.Subtotal 1, xlCount, Array( 2, 3 ), False, False, False&lt;/P&gt;&lt;P&gt;straight to excel and execute it all goes well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also tried &lt;/P&gt;&lt;P&gt;set WW = oXL.Selection.Subtotal(1, xlCount, Array( 2, 3 ), False, False, False)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;..then I tried with only 3 parameters, nothing works on QV project.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why is that and how to solve it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Mar 2013 13:13:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV-subtotals-in-Excel/m-p/436452#M162786</guid>
      <dc:creator>edvapran</dc:creator>
      <dc:date>2013-03-13T13:13:12Z</dc:date>
    </item>
    <item>
      <title>Re: QV subtotals in Excel</title>
      <link>https://community.qlik.com/t5/QlikView/QV-subtotals-in-Excel/m-p/436453#M162787</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;anyone?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Mar 2013 05:56:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QV-subtotals-in-Excel/m-p/436453#M162787</guid>
      <dc:creator>edvapran</dc:creator>
      <dc:date>2013-03-15T05:56:04Z</dc:date>
    </item>
  </channel>
</rss>

