<?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: Excel Merge Cells Macro Help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Excel-Merge-Cells-Macro-Help/m-p/1157764#M377534</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're welcome and glad that you are able to use it. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 01 Jul 2016 14:13:05 GMT</pubDate>
    <dc:creator>trdandamudi</dc:creator>
    <dc:date>2016-07-01T14:13:05Z</dc:date>
    <item>
      <title>Excel Merge Cells Macro Help</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-Merge-Cells-Macro-Help/m-p/1157757#M377527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Currently I am using the macro to export to excel which is working fine and I get the below in excel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="129793" alt="Capture.JPG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/129793_Capture.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here, " Actual Data" is the text object value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Issue is I want to merge the header column to get the below format&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="129815" alt="Capture.JPG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/129815_Capture.JPG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌ &lt;A href="https://community.qlik.com/qlik-users/130924"&gt;avinashelite&lt;/A&gt;‌ &lt;A href="https://community.qlik.com/qlik-users/2286"&gt;rwunderlich&lt;/A&gt; &lt;A href="https://community.qlik.com/qlik-users/96544"&gt;gwassenaar&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2016 10:48:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-Merge-Cells-Macro-Help/m-p/1157757#M377527</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-07-01T10:48:20Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Merge Cells Macro Help</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-Merge-Cells-Macro-Help/m-p/1157758#M377528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you post your macro or some sample document.?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2016 11:18:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-Merge-Cells-Macro-Help/m-p/1157758#M377528</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-07-01T11:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Merge Cells Macro Help</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-Merge-Cells-Macro-Help/m-p/1157759#M377529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to find these cells (+ select ?) and then add mergecells = true. Here a snippet from a more heavier routine of mine:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;elseif CellMatrixThree(iFormatTyp)(2).Text = "MergeCells" then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objExcelDoc.sheets(CellMatrixTwo(iObject)(1).Text).Range(arrFormatValues(iFormatValues)).Select&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; objExcelDoc.sheets(CellMatrixTwo(iObject)(1).Text).Range(arrFormatValues(iFormatValues)).&lt;STRONG&gt;MergeCells = true&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 11.0pt; font-family: 'Calibri','sans-serif';"&gt;- Marcus&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2016 11:23:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-Merge-Cells-Macro-Help/m-p/1157759#M377529</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2016-07-01T11:23:34Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Merge Cells Macro Help</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-Merge-Cells-Macro-Help/m-p/1157760#M377530</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try something like this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;oSH.Range("A1:C1").Merge&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2016 11:36:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-Merge-Cells-Macro-Help/m-p/1157760#M377530</guid>
      <dc:creator>tamilarasu</dc:creator>
      <dc:date>2016-07-01T11:36:20Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Merge Cells Macro Help</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-Merge-Cells-Macro-Help/m-p/1157761#M377531</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kush,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also looking for this Kushal Can you please attach excel and demo qvw after implementation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Vikas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2016 11:45:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-Merge-Cells-Macro-Help/m-p/1157761#M377531</guid>
      <dc:creator>vikasmahajan</dc:creator>
      <dc:date>2016-07-01T11:45:49Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Merge Cells Macro Help</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-Merge-Cells-Macro-Help/m-p/1157762#M377532</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are couple of ways you can do it.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Option I:&lt;/STRONG&gt;&lt;/SPAN&gt; You can center and merge excel data from Qlikview&lt;/P&gt;&lt;P&gt;&lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt;Option II:&lt;/STRONG&gt;&lt;/SPAN&gt; You can have the complete macro in Excel and execute it from Qlikview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In your case you should use Option I. Below is the macro code and I also attached the qlikview file, So that you can modify according to your need. Hope this helps..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SUB GenerateReport&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DIM xlApp, xlBook&lt;/P&gt;&lt;P&gt;Const xlCenter = -4108&lt;/P&gt;&lt;P&gt;on error resume next&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Confirmation = MSGBOX ("Excel Summary Reports export has been initiated." &amp;amp; vbCrLf &amp;amp; _&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Do you want to continue?"&amp;amp; vbCrLf &amp;amp;"",&amp;nbsp; 36, "Export Confirmation")&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF Confirmation = 7 THEN&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit Sub&lt;/P&gt;&lt;P&gt;&amp;nbsp; End IF&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET Doc = ActiveDocument&lt;/P&gt;&lt;P&gt;SET xlApp = CreateObject("Excel.Application")&lt;/P&gt;&lt;P&gt;SET xlBook = xlApp.Workbooks.Add&lt;/P&gt;&lt;P&gt;xlApp.Visible = True&lt;/P&gt;&lt;P&gt;xlApp.ScreenUpdating = False&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; SET xlNewSheet = xlApp.Application.Worksheets.Add&lt;/P&gt;&lt;P&gt;&amp;nbsp; Doc.GetApplication.WaitForIdle&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Copy the Text Box label and paste in Excel&lt;/P&gt;&lt;P&gt;&amp;nbsp; Doc.GetSheetObject("TX02").CopyTextToClipboard&lt;/P&gt;&lt;P&gt;&amp;nbsp; xlApp.ActiveSheet.Range("A1").Select&lt;/P&gt;&lt;P&gt;&amp;nbsp; xlApp.ActiveSheet.Paste&amp;nbsp; 'Paste the table in Cell A1&lt;/P&gt;&lt;P&gt;&amp;nbsp; xlApp.ActiveSheet.Range("A1:C1").Merge&lt;/P&gt;&lt;P&gt;&amp;nbsp; xlApp.ActiveSheet.Range("A1:C1").HorizontalAlignment = xlCenter&lt;/P&gt;&lt;P&gt;&amp;nbsp; 'Copy the table data and paste in Excel&lt;/P&gt;&lt;P&gt;&amp;nbsp; xlApp.ActiveSheet.Range("A2").Select&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Doc.GetSheetObject("TB02").CopyTableToClipBoard True&lt;/P&gt;&lt;P&gt;&amp;nbsp; xlApp.ActiveSheet.Paste&amp;nbsp; 'Paste the table in Cell A2&lt;/P&gt;&lt;P&gt;&amp;nbsp; xlApp.ActiveSheet.Range("A1").Select&lt;/P&gt;&lt;P&gt;&amp;nbsp; xlApp.ScreenUpdating = True&lt;/P&gt;&lt;P&gt;&amp;nbsp; xlApp.Application.Quit&lt;/P&gt;&lt;P&gt;&amp;nbsp; SET objWorkbook = NOTHING&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; SET objExcel = NOTHING&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Merge_And_Center_Header_In_Excel.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/129846_Merge_And_Center_Header_In_Excel.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2016 12:51:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-Merge-Cells-Macro-Help/m-p/1157762#M377532</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2016-07-01T12:51:52Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Merge Cells Macro Help</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-Merge-Cells-Macro-Help/m-p/1157763#M377533</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks &lt;A href="https://community.qlik.com/qlik-users/16307"&gt;trdandamudi&lt;/A&gt; works fine.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2016 14:09:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-Merge-Cells-Macro-Help/m-p/1157763#M377533</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2016-07-01T14:09:41Z</dc:date>
    </item>
    <item>
      <title>Re: Excel Merge Cells Macro Help</title>
      <link>https://community.qlik.com/t5/QlikView/Excel-Merge-Cells-Macro-Help/m-p/1157764#M377534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're welcome and glad that you are able to use it. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Jul 2016 14:13:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Excel-Merge-Cells-Macro-Help/m-p/1157764#M377534</guid>
      <dc:creator>trdandamudi</dc:creator>
      <dc:date>2016-07-01T14:13:05Z</dc:date>
    </item>
  </channel>
</rss>

