<?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: Table borders in macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Table-borders-in-macro/m-p/107115#M758904</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fully agree, but 2 days of trial and error did not accomplish anything: All I want is a sharp border (and possibly get rid of the gridlines) &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 09 Sep 2018 15:01:15 GMT</pubDate>
    <dc:creator>schumi1980</dc:creator>
    <dc:date>2018-09-09T15:01:15Z</dc:date>
    <item>
      <title>Table borders in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Table-borders-in-macro/m-p/107111#M758900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using a macro to extract tables to excel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I try to produce as much of the formatting as possible already in Qlikview (I cannot produce a target file as the exported tables vary in size). Even if I change the pivot table style to classic in Qlikview, it does not alter the output.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I maintain the border style (or produce a border style) in a macro:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I get:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="PictureE1.jpg" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/213006_PictureE1.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;This is what I would like to get:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="PictureE2.jpg" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/213007_PictureE2.jpg" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;I would like to be able to select the area of the table I just put into excel and then make borders.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My macro code is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub exportLossRun2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'==============================================================&lt;/P&gt;&lt;P&gt;' File Path &amp;amp; Name&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Path = "C:\temp\"&lt;/P&gt;&lt;P&gt; FileName = "Test_"&lt;/P&gt;&lt;P&gt; strSaveFile = Path &amp;amp; FileName&lt;/P&gt;&lt;P&gt;'==============================================================&lt;/P&gt;&lt;P&gt;'Open Excel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;set oXL=CreateObject("Excel.Application") &lt;/P&gt;&lt;P&gt;oXL.visible=True &lt;/P&gt;&lt;P&gt;oXL.Workbooks.Add&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;aSheetObj=Array("Name2","Main","Summary1","Summary2")&amp;nbsp; ' Chart ID's here&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'==============================================================&lt;/P&gt;&lt;P&gt;for i=0 to UBound(aSheetObj)&lt;/P&gt;&lt;P&gt; Set oSH = oXL.ActiveSheet&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; num_rows = oSH.UsedRange.Rows.Count&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If num_rows = 1&amp;nbsp; then&lt;/P&gt;&lt;P&gt; oSH.Range("A2").Select&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt; Else&lt;/P&gt;&lt;P&gt; oSH.Range("A" &amp;amp; num_rows+4).Select &lt;/P&gt;&lt;P&gt; End If&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; Set obj = ActiveDocument.GetSheetObject(aSheetObj(i))&lt;/P&gt;&lt;P&gt; obj.CopyTableToClipboard True&lt;/P&gt;&lt;P&gt; oSH.Paste &lt;/P&gt;&lt;P&gt; sCaption=obj.GetCaption.Name.v&lt;/P&gt;&lt;P&gt; set obj=Nothing&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;oSH.Cells.Select&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;oSH.Columns("A").ColumnWidth = 15&lt;/P&gt;&lt;P&gt;oSH.Columns("B").ColumnWidth = 15&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; If num_rows = 1&amp;nbsp; then&lt;/P&gt;&lt;P&gt;oSH.Range("A" &amp;amp; num_rows).Value = sCaption&lt;/P&gt;&lt;P&gt;oSH.Range("A" &amp;amp; num_rows).Font.Bold = True&lt;/P&gt;&lt;P&gt;'oSH.Range("A" &amp;amp; num_rows).Font.ColorIndex = 3&lt;/P&gt;&lt;P&gt;oSH.Range("A" &amp;amp; num_rows).Interior.ColorIndex = 40&lt;/P&gt;&lt;P&gt; Else&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;oSH.Range("A" &amp;amp; num_rows+3).Value&amp;nbsp; = sCaption&lt;/P&gt;&lt;P&gt;oSH.Rows(num_rows+4).Font.Bold = True&lt;/P&gt;&lt;P&gt;'oSH.Range("A" &amp;amp;num_rows+3).Interior.ColorIndex = 40&lt;/P&gt;&lt;P&gt; End If&lt;/P&gt;&lt;P&gt; 'oXL.Selection.Columns.AutoFit&amp;nbsp; &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;next&lt;/P&gt;&lt;P&gt;'==============================================================&lt;/P&gt;&lt;P&gt;&amp;nbsp; oSH.Range("A1").Select&amp;nbsp; &lt;/P&gt;&lt;P&gt;' oXL.Sheets("Sheet2").Delete&lt;/P&gt;&lt;P&gt;' oXL.Sheets("Sheet3").Delete&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; oSH.Name = "Data"&lt;/P&gt;&lt;P&gt;oSH.Rows("1").delete&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;oSH.Rows("1").delete&lt;/P&gt;&lt;P&gt;oSH.Rows("1").Font.Bold = True&lt;/P&gt;&lt;P&gt;oSH.Rows("1").Font.Size = 14&lt;/P&gt;&lt;P&gt;oSH.Rows("1").WrapText = False&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; oXL.ActiveWorkBook.SaveAs strSaveFile &amp;amp; replace(date, "/", "-") &amp;amp; ".xlsx" &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;set oSH = Nothing&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;set oXL=Nothing&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;&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;Many thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Jan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Table-borders-in-macro/m-p/107111#M758900</guid>
      <dc:creator>schumi1980</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Table borders in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Table-borders-in-macro/m-p/107112#M758901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think there is way to achieve it but the solution is not that great. I'll see if any other way can be possible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you use a target file and have multiple sheets for a single &lt;SPAN style="font-size: 13.3333px;"&gt;QlikView &lt;/SPAN&gt;table but each sheet designed per the number of columns as per your QlikView table and the border accordingly.&lt;/P&gt;&lt;P&gt;Again visibility of those target sheets be controlled based on variable set from QlikView. &lt;/P&gt;&lt;P&gt;Based on the # of columns in your QlikView table the target sheet to be set in the macro and you can manage the border style in your target xls template file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again just for border style, implementing such solution won't be wise.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 15:47:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Table-borders-in-macro/m-p/107112#M758901</guid>
      <dc:creator>sudeepkm</dc:creator>
      <dc:date>2018-09-07T15:47:05Z</dc:date>
    </item>
    <item>
      <title>Re: Table borders in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Table-borders-in-macro/m-p/107113#M758902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be great, if you found something. I have not managed that today.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 16:04:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Table-borders-in-macro/m-p/107113#M758902</guid>
      <dc:creator>schumi1980</dc:creator>
      <dc:date>2018-09-07T16:04:57Z</dc:date>
    </item>
    <item>
      <title>Re: Table borders in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Table-borders-in-macro/m-p/107114#M758903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Jan. I spend a lot of time doing something like that. &lt;SPAN lang="en"&gt;The easiest way is to record the macro with all you need using excel's macrorecorder &lt;SPAN lang="en"&gt;and then transfer&lt;/SPAN&gt; it to QV with&lt;SPAN lang="en"&gt; small modifications.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 07 Sep 2018 16:11:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Table-borders-in-macro/m-p/107114#M758903</guid>
      <dc:creator>andrey_krylov</dc:creator>
      <dc:date>2018-09-07T16:11:19Z</dc:date>
    </item>
    <item>
      <title>Re: Table borders in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Table-borders-in-macro/m-p/107115#M758904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Fully agree, but 2 days of trial and error did not accomplish anything: All I want is a sharp border (and possibly get rid of the gridlines) &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Sep 2018 15:01:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Table-borders-in-macro/m-p/107115#M758904</guid>
      <dc:creator>schumi1980</dc:creator>
      <dc:date>2018-09-09T15:01:15Z</dc:date>
    </item>
    <item>
      <title>Re: Table borders in macro</title>
      <link>https://community.qlik.com/t5/QlikView/Table-borders-in-macro/m-p/107116#M758905</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jan,&lt;/P&gt;&lt;P&gt;have a look at the attached example.&lt;/P&gt;&lt;P&gt;Not the most ellegant solution, but it works!&lt;/P&gt;&lt;P&gt;Just edit the path in line 102 inside the module according your environment!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 09 Sep 2018 18:12:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Table-borders-in-macro/m-p/107116#M758905</guid>
      <dc:creator>Frank_Hartmann</dc:creator>
      <dc:date>2018-09-09T18:12:05Z</dc:date>
    </item>
  </channel>
</rss>

